chore: release [ci skip]
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
<parent>
|
||||
<groupId>com.drinkool</groupId>
|
||||
<artifactId>drinkool</artifactId>
|
||||
<version>1.5.18</version>
|
||||
<version>1.5.19</version>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
|
||||
@@ -4,15 +4,15 @@ import com.drinkool.InternalValue;
|
||||
import com.drinkool.dtos.GraphqlDto;
|
||||
import io.smallrye.graphql.client.dynamic.api.DynamicGraphQLClient;
|
||||
import io.smallrye.graphql.client.dynamic.api.DynamicGraphQLClientBuilder;
|
||||
import jakarta.inject.Inject;
|
||||
import jakarta.json.bind.Jsonb;
|
||||
import jakarta.ws.rs.POST;
|
||||
import jakarta.ws.rs.Path;
|
||||
import jakarta.ws.rs.core.Context;
|
||||
import jakarta.ws.rs.core.HttpHeaders;
|
||||
import jakarta.ws.rs.core.MediaType;
|
||||
import jakarta.ws.rs.core.Response;
|
||||
import org.eclipse.microprofile.config.inject.ConfigProperty;
|
||||
import jakarta.inject.Inject;
|
||||
import jakarta.json.bind.Jsonb;
|
||||
import jakarta.ws.rs.core.MediaType;
|
||||
|
||||
@Path("/api/eatery")
|
||||
public class EateryController {
|
||||
@@ -21,7 +21,7 @@ public class EateryController {
|
||||
String eateryUrl;
|
||||
|
||||
@Inject
|
||||
Jsonb jsonb;
|
||||
Jsonb jsonb;
|
||||
|
||||
@POST
|
||||
@Path("/graphql")
|
||||
@@ -51,12 +51,14 @@ public class EateryController {
|
||||
);
|
||||
|
||||
if (response.hasError()) {
|
||||
return Response.status(400).entity(jsonb.toJson(response.getErrors())).build();
|
||||
return Response.status(400)
|
||||
.entity(jsonb.toJson(response.getErrors()))
|
||||
.build();
|
||||
}
|
||||
|
||||
return Response.ok(jsonb.toJson(response.getData()))
|
||||
.type(MediaType.APPLICATION_JSON)
|
||||
.build();
|
||||
.type(MediaType.APPLICATION_JSON)
|
||||
.build();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
return Response.serverError()
|
||||
|
||||
Reference in New Issue
Block a user