aboutsummaryrefslogtreecommitdiffhomepage
path: root/backend
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2025-03-15 21:48:49 +0900
committernsfisis <nsfisis@gmail.com>2025-03-15 21:48:49 +0900
commit5bcb86f50f35de764039cb93f5057dce3ebe4729 (patch)
tree30d2c575518d0e53785302882a463e98dfe55c94 /backend
parentb933bed3b6bf8b51b2916c80533ed64afd27f653 (diff)
downloadphperkaigi-2025-albatross-5bcb86f50f35de764039cb93f5057dce3ebe4729.tar.gz
phperkaigi-2025-albatross-5bcb86f50f35de764039cb93f5057dce3ebe4729.tar.zst
phperkaigi-2025-albatross-5bcb86f50f35de764039cb93f5057dce3ebe4729.zip
feat(backend): allow admin to watch themselves 1v1 page
Diffstat (limited to 'backend')
-rw-r--r--backend/api/handler.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/backend/api/handler.go b/backend/api/handler.go
index a3727c9..4514a25 100644
--- a/backend/api/handler.go
+++ b/backend/api/handler.go
@@ -227,7 +227,7 @@ func (h *Handler) GetGameWatchLatestStates(ctx context.Context, request GetGameW
Status: status,
}
- if int(row.UserID) == user.UserID {
+ if int(row.UserID) == user.UserID && !user.IsAdmin {
return GetGameWatchLatestStates403JSONResponse{
ForbiddenJSONResponse: ForbiddenJSONResponse{
Message: "You are one of the main players of this game",