From efc95e7feadbf6898765bcef4e9e9eed55c5606e Mon Sep 17 00:00:00 2001 From: Imbus <> Date: Fri, 8 Mar 2024 10:30:17 +0100 Subject: [PATCH] Add target for formatting swag docs & formatting swag docs --- backend/Makefile | 4 ++++ backend/internal/handlers/global_state.go | 6 +++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/backend/Makefile b/backend/Makefile index bd906e4..2200639 100644 --- a/backend/Makefile +++ b/backend/Makefile @@ -76,6 +76,10 @@ default: build docs: swag init -outputTypes go +.PHONY: docfmt +docfmt: + swag fmt + install-swag: @echo "Installing swag" @go get -u github.com/swaggo/swag/cmd/swag diff --git a/backend/internal/handlers/global_state.go b/backend/internal/handlers/global_state.go index 4c642ff..689759b 100644 --- a/backend/internal/handlers/global_state.go +++ b/backend/internal/handlers/global_state.go @@ -53,9 +53,9 @@ type GState struct { // @Tags User // @Accept json // @Produce json -// @Success 200 {string} string "User added" -// @Failure 400 {string} string "Bad request" -// @Failure 500 {string} string "Internal server error" +// @Success 200 {string} string "User added" +// @Failure 400 {string} string "Bad request" +// @Failure 500 {string} string "Internal server error" // @Router /api/register [post] func (gs *GState) Register(c *fiber.Ctx) error { u := new(types.User)