chore: update

This commit is contained in:
TakahashiNg
2026-05-07 13:52:38 +00:00
parent 3ead9fdb64
commit 2c3dfbc5c6
2 changed files with 15 additions and 3 deletions
@@ -1,5 +1,6 @@
package com.drinkool.controller;
import com.drinkool.InternalValue;
import com.drinkool.Url;
import com.drinkool.enums.SortBy;
import com.drinkool.lib.dtos.GraphqlDto;
@@ -9,6 +10,7 @@ import io.smallrye.mutiny.Uni;
import jakarta.inject.Inject;
import jakarta.ws.rs.DefaultValue;
import jakarta.ws.rs.GET;
import jakarta.ws.rs.HeaderParam;
import jakarta.ws.rs.POST;
import jakarta.ws.rs.Path;
import jakarta.ws.rs.PathParam;
@@ -43,8 +45,12 @@ public class EateryController extends GraphqlBase {
@POST
@Path(Url.Review)
public Uni<Response> receiveReview(SendReview input) {
return reviewService.receiveReview(input);
public Uni<Response> receiveReview(
SendReview input,
@HeaderParam(InternalValue.userId) UUID userId,
@HeaderParam(InternalValue.role) String role
) {
return reviewService.receiveReview(input, userId, role);
}
@POST
@@ -1,11 +1,13 @@
package com.drinkool.services;
import com.drinkool.InternalValue;
import com.drinkool.Url;
import com.drinkool.enums.SortBy;
import com.drinkool.lib.dtos.SendReview;
import io.smallrye.mutiny.Uni;
import jakarta.ws.rs.DefaultValue;
import jakarta.ws.rs.GET;
import jakarta.ws.rs.HeaderParam;
import jakarta.ws.rs.POST;
import jakarta.ws.rs.Path;
import jakarta.ws.rs.PathParam;
@@ -25,5 +27,9 @@ public interface ReviewService {
);
@POST
public Uni<Response> receiveReview(SendReview input);
public Uni<Response> receiveReview(
SendReview input,
@HeaderParam(InternalValue.userId) UUID userId,
@HeaderParam(InternalValue.role) String role
);
}