feat: init k8s and customer service #15
@@ -15,6 +15,10 @@ public class CustomerService {
|
||||
@Path(Url.Me)
|
||||
@Transactional
|
||||
public Response me(@HeaderParam(Jwt.userId) UUID id) {
|
||||
if (id == null) return Response.status(Response.Status.BAD_REQUEST)
|
||||
.entity("InvalidUserId")
|
||||
.build();
|
||||
|
||||
return Response.ok(CustomerEntity.find("id", id).firstResult()).build();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -45,7 +45,6 @@ public class CustomberServiceTest {
|
||||
.when()
|
||||
.post(Url.Me)
|
||||
.then()
|
||||
// Tùy vào logic xử lý của bạn, có thể trả về 200 kèm body null hoặc 400
|
||||
.statusCode(200);
|
||||
.statusCode(400);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user