From 85d819024928b7fc075325956b6d81aa18d70079 Mon Sep 17 00:00:00 2001 From: alexrefshauge Date: Fri, 25 Oct 2024 20:29:08 +0200 Subject: [PATCH 1/2] fix --- backend/api/handlers/penaltyHandlers.go | 11 +++++++---- frontend/src/components/hooks/appContext.tsx | 2 ++ 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/backend/api/handlers/penaltyHandlers.go b/backend/api/handlers/penaltyHandlers.go index d779d78..ddaa242 100644 --- a/backend/api/handlers/penaltyHandlers.go +++ b/backend/api/handlers/penaltyHandlers.go @@ -62,10 +62,13 @@ type GetPenaltyHistoryResponse struct { // Get // -// @Id get -// @Param ids query string true "ids" -// @Success 200 {array} PenaltyEntry -// @Router /penalty/get [get] +// @Id get +// @Schemes +// @Description Get penalties by ids +// @Tags penalty +// @Param ids query string true "ids" +// @Success 200 {array} PenaltyEntry +// @Router /penalty/get [get] func (db *DbContext) Get(ctx *gin.Context) { ids := ctx.Param("ids") idList := strings.Split(ids, ",") diff --git a/frontend/src/components/hooks/appContext.tsx b/frontend/src/components/hooks/appContext.tsx index e04842f..be13d67 100644 --- a/frontend/src/components/hooks/appContext.tsx +++ b/frontend/src/components/hooks/appContext.tsx @@ -1,7 +1,9 @@ import { createContext, ReactNode, SetStateAction, useContext } from 'react' import { UserPublic, Team, Notification } from '../openapi/requests' import { + useDefaultServiceGet, useNotificationServiceGetFiltered, + usePenaltyServiceGet, useTeamServiceGetTeamsByUserId, useUserServiceGetUser, } from '../openapi/queries' From 6cd32bf174800cff442b78069de7c47f67399f4c Mon Sep 17 00:00:00 2001 From: alexrefshauge Date: Fri, 25 Oct 2024 20:32:33 +0200 Subject: [PATCH 2/2] fix --- frontend/src/components/hooks/appContext.tsx | 2 -- 1 file changed, 2 deletions(-) diff --git a/frontend/src/components/hooks/appContext.tsx b/frontend/src/components/hooks/appContext.tsx index be13d67..e04842f 100644 --- a/frontend/src/components/hooks/appContext.tsx +++ b/frontend/src/components/hooks/appContext.tsx @@ -1,9 +1,7 @@ import { createContext, ReactNode, SetStateAction, useContext } from 'react' import { UserPublic, Team, Notification } from '../openapi/requests' import { - useDefaultServiceGet, useNotificationServiceGetFiltered, - usePenaltyServiceGet, useTeamServiceGetTeamsByUserId, useUserServiceGetUser, } from '../openapi/queries'