aboutsummaryrefslogtreecommitdiffhomepage
path: root/backend/api
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2025-03-21 12:22:32 +0900
committernsfisis <nsfisis@gmail.com>2025-03-21 12:24:00 +0900
commita75f9fa78897de7317fe336e68db7a255899ae33 (patch)
tree3ec56670b7f51c0f2929dfc0c9a55ae48f6820af /backend/api
parent95903269b252729ee6573a5b607d98fa0223cd9a (diff)
downloadphperkaigi-2025-albatross-a75f9fa78897de7317fe336e68db7a255899ae33.tar.gz
phperkaigi-2025-albatross-a75f9fa78897de7317fe336e68db7a255899ae33.tar.zst
phperkaigi-2025-albatross-a75f9fa78897de7317fe336e68db7a255899ae33.zip
feat(frontend): do not transit to finished page
Diffstat (limited to 'backend/api')
-rw-r--r--backend/api/handler.go2
1 files changed, 2 insertions, 0 deletions
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),