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