diff options
Diffstat (limited to 'backend/api/handler_wrapper.go')
| -rw-r--r-- | backend/api/handler_wrapper.go | 40 |
1 files changed, 10 insertions, 30 deletions
diff --git a/backend/api/handler_wrapper.go b/backend/api/handler_wrapper.go index b88ddb2..5feaac7 100644 --- a/backend/api/handler_wrapper.go +++ b/backend/api/handler_wrapper.go @@ -29,9 +29,7 @@ func (h *HandlerWrapper) GetGame(ctx context.Context, request GetGameRequestObje user, ok := GetJWTClaimsFromContext(ctx) if !ok { return GetGame401JSONResponse{ - UnauthorizedJSONResponse: UnauthorizedJSONResponse{ - Message: "Unauthorized", - }, + Message: "Unauthorized", }, nil } return h.impl.GetGame(ctx, request, user) @@ -41,9 +39,7 @@ func (h *HandlerWrapper) GetGamePlayLatestState(ctx context.Context, request Get user, ok := GetJWTClaimsFromContext(ctx) if !ok { return GetGamePlayLatestState401JSONResponse{ - UnauthorizedJSONResponse: UnauthorizedJSONResponse{ - Message: "Unauthorized", - }, + Message: "Unauthorized", }, nil } return h.impl.GetGamePlayLatestState(ctx, request, user) @@ -53,9 +49,7 @@ func (h *HandlerWrapper) GetGameWatchLatestStates(ctx context.Context, request G user, ok := GetJWTClaimsFromContext(ctx) if !ok { return GetGameWatchLatestStates401JSONResponse{ - UnauthorizedJSONResponse: UnauthorizedJSONResponse{ - Message: "Unauthorized", - }, + Message: "Unauthorized", }, nil } return h.impl.GetGameWatchLatestStates(ctx, request, user) @@ -65,9 +59,7 @@ func (h *HandlerWrapper) GetGameWatchRanking(ctx context.Context, request GetGam user, ok := GetJWTClaimsFromContext(ctx) if !ok { return GetGameWatchRanking401JSONResponse{ - UnauthorizedJSONResponse: UnauthorizedJSONResponse{ - Message: "Unauthorized", - }, + Message: "Unauthorized", }, nil } return h.impl.GetGameWatchRanking(ctx, request, user) @@ -77,9 +69,7 @@ func (h *HandlerWrapper) GetGames(ctx context.Context, request GetGamesRequestOb user, ok := GetJWTClaimsFromContext(ctx) if !ok { return GetGames401JSONResponse{ - UnauthorizedJSONResponse: UnauthorizedJSONResponse{ - Message: "Unauthorized", - }, + Message: "Unauthorized", }, nil } return h.impl.GetGames(ctx, request, user) @@ -89,9 +79,7 @@ func (h *HandlerWrapper) GetMe(ctx context.Context, request GetMeRequestObject) user, ok := GetJWTClaimsFromContext(ctx) if !ok { return GetMe401JSONResponse{ - UnauthorizedJSONResponse: UnauthorizedJSONResponse{ - Message: "Unauthorized", - }, + Message: "Unauthorized", }, nil } return h.impl.GetMe(ctx, request, user) @@ -101,9 +89,7 @@ func (h *HandlerWrapper) GetTournament(ctx context.Context, request GetTournamen user, ok := GetJWTClaimsFromContext(ctx) if !ok { return GetTournament401JSONResponse{ - UnauthorizedJSONResponse: UnauthorizedJSONResponse{ - Message: "Unauthorized", - }, + Message: "Unauthorized", }, nil } return h.impl.GetTournament(ctx, request, user) @@ -113,9 +99,7 @@ func (h *HandlerWrapper) PostGamePlayCode(ctx context.Context, request PostGameP user, ok := GetJWTClaimsFromContext(ctx) if !ok { return PostGamePlayCode401JSONResponse{ - UnauthorizedJSONResponse: UnauthorizedJSONResponse{ - Message: "Unauthorized", - }, + Message: "Unauthorized", }, nil } return h.impl.PostGamePlayCode(ctx, request, user) @@ -125,9 +109,7 @@ func (h *HandlerWrapper) PostGamePlaySubmit(ctx context.Context, request PostGam user, ok := GetJWTClaimsFromContext(ctx) if !ok { return PostGamePlaySubmit401JSONResponse{ - UnauthorizedJSONResponse: UnauthorizedJSONResponse{ - Message: "Unauthorized", - }, + Message: "Unauthorized", }, nil } return h.impl.PostGamePlaySubmit(ctx, request, user) @@ -141,9 +123,7 @@ func (h *HandlerWrapper) PostLogout(ctx context.Context, request PostLogoutReque user, ok := GetJWTClaimsFromContext(ctx) if !ok { return PostLogout401JSONResponse{ - UnauthorizedJSONResponse: UnauthorizedJSONResponse{ - Message: "Unauthorized", - }, + Message: "Unauthorized", }, nil } return h.impl.PostLogout(ctx, request, user) |
