From a75f9fa78897de7317fe336e68db7a255899ae33 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Fri, 21 Mar 2025 12:22:32 +0900 Subject: feat(frontend): do not transit to finished page --- backend/api/handler.go | 2 ++ 1 file changed, 2 insertions(+) (limited to 'backend/api/handler.go') diff --git a/backend/api/handler.go b/backend/api/handler.go index 39fa0c2..d498770 100644 --- a/backend/api/handler.go +++ b/backend/api/handler.go @@ -274,6 +274,7 @@ func (h *Handler) GetGameWatchRanking(ctx context.Context, request GetGameWatchR func (h *Handler) PostGamePlayCode(ctx context.Context, request PostGamePlayCodeRequestObject, user *auth.JWTClaims) (PostGamePlayCodeResponseObject, error) { gameID := request.GameID userID := user.UserID + // TODO: check if the game is running err := h.q.UpdateCode(ctx, db.UpdateCodeParams{ GameID: int32(gameID), UserID: int32(userID), @@ -291,6 +292,7 @@ func (h *Handler) PostGamePlaySubmit(ctx context.Context, request PostGamePlaySu userID := user.UserID code := request.Body.Code codeSize := h.hub.CalcCodeSize(code) + // TODO: check if the game is running // TODO: transaction err := h.q.UpdateCodeAndStatus(ctx, db.UpdateCodeAndStatusParams{ GameID: int32(gameID), -- cgit v1.2.3-70-g09d2