chore: update
This commit is contained in:
@@ -80,7 +80,7 @@ public class ManagerService extends BaseService<ManagerEntity> {
|
|||||||
) {
|
) {
|
||||||
ManagerEntity manager = ManagerEntity.findById(id);
|
ManagerEntity manager = ManagerEntity.findById(id);
|
||||||
if (manager == null) {
|
if (manager == null) {
|
||||||
return Response.status(Response.Status.NOT_FOUND)
|
return Response.status(Response.Status.BAD_REQUEST)
|
||||||
.entity("ManagerNotFound")
|
.entity("ManagerNotFound")
|
||||||
.build();
|
.build();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ import io.quarkus.redis.datasource.RedisDataSource;
|
|||||||
import io.quarkus.redis.datasource.hash.HashCommands;
|
import io.quarkus.redis.datasource.hash.HashCommands;
|
||||||
import io.quarkus.redis.datasource.value.ValueCommands;
|
import io.quarkus.redis.datasource.value.ValueCommands;
|
||||||
import io.smallrye.mutiny.Uni;
|
import io.smallrye.mutiny.Uni;
|
||||||
|
import io.smallrye.mutiny.infrastructure.Infrastructure;
|
||||||
import io.vertx.core.http.HttpServerRequest;
|
import io.vertx.core.http.HttpServerRequest;
|
||||||
import jakarta.enterprise.context.ApplicationScoped;
|
import jakarta.enterprise.context.ApplicationScoped;
|
||||||
import jakarta.inject.Inject;
|
import jakarta.inject.Inject;
|
||||||
@@ -54,6 +55,7 @@ public class CartService {
|
|||||||
|
|
||||||
return eateryController
|
return eateryController
|
||||||
.getEateryById(eateryId)
|
.getEateryById(eateryId)
|
||||||
|
.emitOn(Infrastructure.getDefaultWorkerPool())
|
||||||
.onItem()
|
.onItem()
|
||||||
.transform(response -> {
|
.transform(response -> {
|
||||||
if (response.getStatus() != Response.Status.OK.getStatusCode()) {
|
if (response.getStatus() != Response.Status.OK.getStatusCode()) {
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ public class EateryService {
|
|||||||
EateryEntity eatery = EateryEntity.findById(id);
|
EateryEntity eatery = EateryEntity.findById(id);
|
||||||
|
|
||||||
if (eatery == null) {
|
if (eatery == null) {
|
||||||
return Response.status(Response.Status.NOT_FOUND)
|
return Response.status(Response.Status.BAD_REQUEST)
|
||||||
.entity("NotFoundEatery")
|
.entity("NotFoundEatery")
|
||||||
.build();
|
.build();
|
||||||
}
|
}
|
||||||
@@ -63,7 +63,7 @@ public class EateryService {
|
|||||||
).firstResult();
|
).firstResult();
|
||||||
|
|
||||||
if (menuItem == null) {
|
if (menuItem == null) {
|
||||||
return Response.status(Response.Status.NOT_FOUND)
|
return Response.status(Response.Status.BAD_REQUEST)
|
||||||
.entity("NotFoundMenuItem")
|
.entity("NotFoundMenuItem")
|
||||||
.build();
|
.build();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user