From 5bcb86f50f35de764039cb93f5057dce3ebe4729 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Sat, 15 Mar 2025 21:48:49 +0900 Subject: feat(backend): allow admin to watch themselves 1v1 page --- backend/api/handler.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'backend/api/handler.go') 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", -- cgit v1.2.3-70-g09d2