diff options
| author | nsfisis <nsfisis@gmail.com> | 2025-03-15 21:48:49 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2025-03-15 21:48:49 +0900 |
| commit | 5bcb86f50f35de764039cb93f5057dce3ebe4729 (patch) | |
| tree | 30d2c575518d0e53785302882a463e98dfe55c94 /backend/api/handler.go | |
| parent | b933bed3b6bf8b51b2916c80533ed64afd27f653 (diff) | |
| download | phperkaigi-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/api/handler.go')
| -rw-r--r-- | backend/api/handler.go | 2 |
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", |
