Skip to content

Commit

Permalink
[PBS-84][Anh Dao] fix: get staff by staff
Browse files Browse the repository at this point in the history
  • Loading branch information
toki-ai committed Nov 8, 2024
1 parent abf3f44 commit 332068c
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
import java.io.IOException;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import java.util.ArrayList;
import java.util.List;

@RestController
Expand Down Expand Up @@ -201,7 +202,12 @@ else if (account.getRole().equals(AccountRole.Manager)) {
.build();
}
else {
throw new AppException(ErrorCode.UNAUTHORIZED);
List<AccountOrderResponse> list = new ArrayList<>();
list.add(new AccountOrderResponse(account.getId(), account.getName(), account.getEmail(), account.getAvatar(), account.getRole(), account.getBuildingNumber(), account.getRankingName()));
return ApiResponse.<List<AccountOrderResponse>>builder()
.message("Không có quyền truy cập")
.data(list)
.build();
}
}
}
Expand Down

0 comments on commit 332068c

Please sign in to comment.