c6683b28dc
Release package / release (push) Successful in 17m59s
Co-authored-by: TakahashiNg <83152264+TakahashiNguyen@users.noreply.github.com> Reviewed-on: #50
34 lines
813 B
Java
34 lines
813 B
Java
package com.drinkool.controller;
|
|
|
|
import com.drinkool.InternalValue;
|
|
import com.drinkool.Role;
|
|
import com.drinkool.Url;
|
|
import com.drinkool.lib.dtos.Signup;
|
|
import com.drinkool.services.StaffService;
|
|
import io.smallrye.mutiny.Uni;
|
|
import jakarta.inject.Inject;
|
|
import jakarta.ws.rs.HeaderParam;
|
|
import jakarta.ws.rs.POST;
|
|
import jakarta.ws.rs.Path;
|
|
import jakarta.ws.rs.core.Response;
|
|
import java.util.UUID;
|
|
import org.eclipse.microprofile.rest.client.inject.RestClient;
|
|
|
|
@Path("/api/" + Role.Staff)
|
|
public class StaffController {
|
|
|
|
@Inject
|
|
@RestClient
|
|
StaffService staffService;
|
|
|
|
@POST
|
|
@Path(Url.Signup)
|
|
public Uni<Response> signup(
|
|
Signup input,
|
|
@HeaderParam(InternalValue.userId) UUID userId,
|
|
@HeaderParam(InternalValue.role) String role
|
|
) {
|
|
return staffService.signup(input, userId, role);
|
|
}
|
|
}
|