From 5c1b2846a1c6a9ea3690ac03d58149c3715f04d4 Mon Sep 17 00:00:00 2001 From: kolaente Date: Sat, 7 Sep 2024 13:26:44 +0200 Subject: [PATCH] docs(api): use correct return type for the /user endpoint --- pkg/routes/api/v1/user_show.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pkg/routes/api/v1/user_show.go b/pkg/routes/api/v1/user_show.go index 500b481ca..f902df5bc 100644 --- a/pkg/routes/api/v1/user_show.go +++ b/pkg/routes/api/v1/user_show.go @@ -31,21 +31,21 @@ import ( "github.com/labstack/echo/v4" ) -type userWithSettings struct { +type UserWithSettings struct { user.User Settings *UserSettings `json:"settings"` DeletionScheduledAt time.Time `json:"deletion_scheduled_at"` IsLocalUser bool `json:"is_local_user"` } -// UserShow gets all informations about the current user +// UserShow gets all information about the current user // @Summary Get user information -// @Description Returns the current user object. +// @Description Returns the current user object with their settings. // @tags user // @Accept json // @Produce json // @Security JWTKeyAuth -// @Success 200 {object} user.User +// @Success 200 {object} v1.UserWithSettings // @Failure 404 {object} web.HTTPError "User does not exist." // @Failure 500 {object} models.Message "Internal server error." // @Router /user [get] @@ -63,7 +63,7 @@ func UserShow(c echo.Context) error { return handler.HandleHTTPError(err) } - us := &userWithSettings{ + us := &UserWithSettings{ User: *u, Settings: &UserSettings{ Name: u.Name,