Files
backend/gateway-service/src/main/java/com/drinkool/services/ReviewService.java
T
2026-05-16 03:29:12 +00:00

36 lines
974 B
Java

package com.drinkool.services;
import com.drinkool.InternalValue;
import com.drinkool.Url;
import com.drinkool.dtos.SendReview;
import com.drinkool.enums.SortBy;
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;
import jakarta.ws.rs.QueryParam;
import jakarta.ws.rs.core.Response;
import java.util.UUID;
import org.eclipse.microprofile.rest.client.inject.RegisterRestClient;
@RegisterRestClient(configKey = "eatery")
@Path(Url.Review)
public interface ReviewService {
@GET
@Path("/{eateryId}")
public Uni<Response> getReviewsByEatery(
@PathParam("eateryId") UUID eateryId,
@QueryParam("sort") @DefaultValue("LATEST") SortBy sortBy
);
@POST
public Uni<Response> receiveReview(
SendReview input,
@HeaderParam(InternalValue.userId) UUID userId,
@HeaderParam(InternalValue.role) String role
);
}