feat: added swaggo support

This commit is contained in:
Robin Dittmar
2026-07-28 14:41:49 +02:00
parent cb14374d09
commit 2e1fbc6e68
7 changed files with 80 additions and 6 deletions
+12
View File
@@ -17,6 +17,18 @@ func NewAuthHandler(authService *domain.AuthService) *AuthHandler {
return &AuthHandler{AuthService: authService}
}
// Login handles the login of a user
//
// @Summary Login route
// @Description User authorization and token issuing
// @Tags Authorization
// @Accept json
// @Produce json
// @Param payload body request.LoginPayload true "Login payload"
// @Success 200 {object} domain.AuthToken
// @Error 400 {object} response.ErrorResponse "failed to decode request body"
// @Error 500 {object} response.ErrorResponse "failed to login"
// @Router /api/v1/login [post]
func (h *AuthHandler) Login(w http.ResponseWriter, r *http.Request) {
ctx := r.Context()