aboutsummaryrefslogtreecommitdiffhomepage
path: root/backend/api/handler.go
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2025-09-06 00:32:03 +0900
committernsfisis <nsfisis@gmail.com>2025-09-06 00:32:03 +0900
commite33bfff4db95586a3140b5e71a7d3dba2c72f694 (patch)
treee469dee99215bb888c3dd3f30d0c3cfba0f669d0 /backend/api/handler.go
parent94d03dc712aff58e7594e7af38e0b6881238c778 (diff)
downloadiosdc-japan-2025-albatross-e33bfff4db95586a3140b5e71a7d3dba2c72f694.tar.gz
iosdc-japan-2025-albatross-e33bfff4db95586a3140b5e71a7d3dba2c72f694.tar.zst
iosdc-japan-2025-albatross-e33bfff4db95586a3140b5e71a7d3dba2c72f694.zip
feat(backend): add admin page for problems
Diffstat (limited to 'backend/api/handler.go')
-rw-r--r--backend/api/handler.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/backend/api/handler.go b/backend/api/handler.go
index 4321d15..60dab6f 100644
--- a/backend/api/handler.go
+++ b/backend/api/handler.go
@@ -88,7 +88,7 @@ func (h *Handler) GetGames(ctx context.Context, _ GetGamesRequestObject, _ *auth
ProblemID: int(row.ProblemID),
Title: row.Title,
Description: row.Description,
- Language: ProblemLanguage(*row.Language),
+ Language: ProblemLanguage(row.Language),
SampleCode: row.SampleCode,
},
}
@@ -167,7 +167,7 @@ func (h *Handler) GetGame(ctx context.Context, request GetGameRequestObject, _ *
ProblemID: int(row.ProblemID),
Title: row.Title,
Description: row.Description,
- Language: ProblemLanguage(*row.Language),
+ Language: ProblemLanguage(row.Language),
SampleCode: row.SampleCode,
},
MainPlayers: mainPlayers,
@@ -305,7 +305,7 @@ func (h *Handler) PostGamePlaySubmit(ctx context.Context, request PostGamePlaySu
return nil, echo.NewHTTPError(http.StatusInternalServerError, err.Error())
}
- language := *gameRow.Language
+ language := gameRow.Language
codeSize := h.hub.CalcCodeSize(code, language)
// TODO: check if the game is running
// TODO: transaction