diff --git a/Makefile b/Makefile index 3c3c1a6..ebc5a89 100644 --- a/Makefile +++ b/Makefile @@ -18,6 +18,7 @@ dev-front: .PHONY: deploy deploy: frontend/dist + unset DOCKER_HOST docker context use curie - docker compose up -d + docker compose up -d --build --remove-orphans docker context use default diff --git a/api/openapi.yaml b/api/openapi.yaml index 5076286..3b0dcb0 100644 --- a/api/openapi.yaml +++ b/api/openapi.yaml @@ -278,7 +278,6 @@ components: - taskCount - createdAt - authors - - icon taskView: type: object properties: @@ -309,8 +308,6 @@ components: type: string code: type: string - required: - - description gameEdit: type: object properties: @@ -370,7 +367,6 @@ components: code: type: string required: - - description - code gameType: type: string diff --git a/api/server.go b/api/server.go index d95adfc..421aafd 100644 --- a/api/server.go +++ b/api/server.go @@ -295,27 +295,27 @@ func RegisterHandlersWithBaseURL(router EchoRouter, si ServerInterface, baseURL // Base64 encoded, gzipped, json marshaled Swagger object var swaggerSpec = []string{ - "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", + "DejHuuwXOmURC2nkK9fl/wEAAP//MtUIV2ocAAA=", } // GetSwagger returns the content of the embedded swagger specification file diff --git a/api/types.go b/api/types.go index 4f602f0..e02bb79 100644 --- a/api/types.go +++ b/api/types.go @@ -36,14 +36,14 @@ const ( // CodeEdit defines model for codeEdit. type CodeEdit struct { Code string `json:"code"` - Description string `json:"description"` + Description *string `json:"description,omitempty"` Id *openapi_types.UUID `json:"id,omitempty"` } // CodeView defines model for codeView. type CodeView struct { Code *string `json:"code,omitempty"` - Description string `json:"description"` + Description *string `json:"description,omitempty"` } // FileItem defines model for fileItem. @@ -70,16 +70,16 @@ type GameType string // GameView defines model for gameView. type GameView struct { - Authors []UserView `json:"authors"` - CreatedAt string `json:"createdAt"` - Description string `json:"description"` - Icon openapi_types.UUID `json:"icon"` - Id openapi_types.UUID `json:"id"` - Points int `json:"points"` - TaskCount int `json:"taskCount"` - Title string `json:"title"` - Type GameType `json:"type"` - Visible *bool `json:"visible,omitempty"` + Authors []UserView `json:"authors"` + CreatedAt string `json:"createdAt"` + Description string `json:"description"` + Icon *openapi_types.UUID `json:"icon,omitempty"` + Id openapi_types.UUID `json:"id"` + Points int `json:"points"` + TaskCount int `json:"taskCount"` + Title string `json:"title"` + Type GameType `json:"type"` + Visible *bool `json:"visible,omitempty"` } // TaskEdit defines model for taskEdit. diff --git a/frontend/src/App.jsx b/frontend/src/App.jsx index 572cafa..693be2b 100644 --- a/frontend/src/App.jsx +++ b/frontend/src/App.jsx @@ -46,7 +46,7 @@ const router = createBrowserRouter( } - // loader={() => ajax(`/api/admin/games`)} + loader={() => ({ quest: null, files: [] })} />