chore: update
Java CI with Maven / test (pull_request) Successful in 7m54s
Java CI with Maven / build (pull_request) Successful in 27m48s

This commit is contained in:
TakahashiNg
2026-05-12 01:45:58 +00:00
parent 2f6f22941d
commit 82b0c88fcc
2 changed files with 6 additions and 3 deletions
@@ -161,7 +161,7 @@ public class ShiftService {
@Description("Quản lý xóa một ca trực")
@RolesAllowed(Role.Manager)
@Transactional
public boolean deleteShift(@Name("id") Long id) throws GraphQLException {
public boolean deleteShift(@Name("id") UUID id) throws GraphQLException {
String ownerId = request.getHeader(InternalValue.userId);
EateryEntity eatery = EateryEntity.findByOwnerId(ownerId);
@@ -145,6 +145,8 @@ public class ShiftServiceTest {
given()
.contentType("application/json")
.header(InternalValue.userId, staffId.toString())
.header(InternalValue.managerId, ownerId.toString())
.header(InternalValue.role, Role.Staff)
.body("{ \"query\": \"" + mutation + "\" }")
.when()
.post("/graphql")
@@ -164,8 +166,7 @@ public class ShiftServiceTest {
"12:00:00",
eatery
);
UUID staffId = UUID.randomUUID();
registerStaffToShift(staffId, shift);
registerStaffToShift(UUID.randomUUID(), shift);
String mutation = String.format(
"mutation { deleteShift(id: \\\"%s\\\") }",
@@ -173,6 +174,8 @@ public class ShiftServiceTest {
);
given()
.header(InternalValue.userId, ownerId.toString())
.header(InternalValue.role, Role.Manager)
.contentType("application/json")
.body("{ \"query\": \"" + mutation + "\" }")
.when()