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