aboutsummaryrefslogtreecommitdiffhomepage
path: root/backend/api/handler.go
diff options
context:
space:
mode:
Diffstat (limited to 'backend/api/handler.go')
-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),