aboutsummaryrefslogtreecommitdiffhomepage
path: root/backend/api/handler_wrapper.go
diff options
context:
space:
mode:
Diffstat (limited to 'backend/api/handler_wrapper.go')
-rw-r--r--backend/api/handler_wrapper.go12
1 files changed, 12 insertions, 0 deletions
diff --git a/backend/api/handler_wrapper.go b/backend/api/handler_wrapper.go
index 9c6c41a..c592ed8 100644
--- a/backend/api/handler_wrapper.go
+++ b/backend/api/handler_wrapper.go
@@ -99,6 +99,18 @@ func (h *HandlerWrapper) GetGames(ctx context.Context, request GetGamesRequestOb
return h.impl.GetGames(ctx, request, user)
}
+func (h *HandlerWrapper) GetTournament(ctx context.Context, request GetTournamentRequestObject) (GetTournamentResponseObject, error) {
+ user, err := parseJWTClaimsFromAuthorizationHeader(request.Params.Authorization)
+ if err != nil {
+ return GetTournament401JSONResponse{
+ UnauthorizedJSONResponse: UnauthorizedJSONResponse{
+ Message: "Unauthorized",
+ },
+ }, nil
+ }
+ return h.impl.GetTournament(ctx, request, user)
+}
+
func (h *HandlerWrapper) PostGamePlayCode(ctx context.Context, request PostGamePlayCodeRequestObject) (PostGamePlayCodeResponseObject, error) {
user, err := parseJWTClaimsFromAuthorizationHeader(request.Params.Authorization)
if err != nil {