From e33bfff4db95586a3140b5e71a7d3dba2c72f694 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Sat, 6 Sep 2025 00:32:03 +0900 Subject: feat(backend): add admin page for problems --- backend/api/handler.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'backend/api/handler.go') 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 -- cgit v1.2.3-70-g09d2