chore: update
This commit is contained in:
@@ -16,6 +16,7 @@ import jakarta.enterprise.context.ApplicationScoped;
|
||||
import jakarta.inject.Inject;
|
||||
import jakarta.transaction.Transactional;
|
||||
import jakarta.ws.rs.GET;
|
||||
import jakarta.ws.rs.POST;
|
||||
import jakarta.ws.rs.Path;
|
||||
import jakarta.ws.rs.PathParam;
|
||||
import jakarta.ws.rs.core.Response;
|
||||
@@ -157,10 +158,11 @@ public class EateryService {
|
||||
return MenuItemEntity.list("eatery", eatery);
|
||||
}
|
||||
|
||||
@Query("calculateOrderSummary")
|
||||
public OrderBill calculateOrderSummary(
|
||||
@Name("eateryId") UUID eateryId,
|
||||
@Name("items") List<OrderItem> inputItems
|
||||
@POST
|
||||
@Path("/{id}")
|
||||
public Response getSummary(
|
||||
List<OrderItem> inputItems,
|
||||
@PathParam("id") UUID eateryId
|
||||
) {
|
||||
List<OrderItem> details = new ArrayList<>();
|
||||
double grandTotal = 0;
|
||||
@@ -185,6 +187,6 @@ public class EateryService {
|
||||
}
|
||||
}
|
||||
|
||||
return new OrderBill(details, grandTotal, "");
|
||||
return Response.ok(new OrderBill(details, grandTotal, "")).build();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user