diff --git a/docs/docs.go b/docs/docs.go index b644d68..32f77fe 100644 --- a/docs/docs.go +++ b/docs/docs.go @@ -8436,7 +8436,7 @@ const docTemplate = `{ }, "/api/v1/users": { "get": { - "description": "Get users with optional filters. Each user may include active_subscription when they have a current ACTIVE, non-expired plan.", + "description": "Get users with optional filters. Each user includes active_subscription: an object when they have a current ACTIVE, non-expired plan, otherwise null.", "consumes": [ "application/json" ], diff --git a/docs/swagger.json b/docs/swagger.json index d0094b4..441eac1 100644 --- a/docs/swagger.json +++ b/docs/swagger.json @@ -8428,7 +8428,7 @@ }, "/api/v1/users": { "get": { - "description": "Get users with optional filters. Each user may include active_subscription when they have a current ACTIVE, non-expired plan.", + "description": "Get users with optional filters. Each user includes active_subscription: an object when they have a current ACTIVE, non-expired plan, otherwise null.", "consumes": [ "application/json" ], diff --git a/docs/swagger.yaml b/docs/swagger.yaml index a1538d8..1fbe3a4 100644 --- a/docs/swagger.yaml +++ b/docs/swagger.yaml @@ -8017,8 +8017,8 @@ paths: get: consumes: - application/json - description: Get users with optional filters. Each user may include active_subscription - when they have a current ACTIVE, non-expired plan. + description: 'Get users with optional filters. Each user includes active_subscription: + an object when they have a current ACTIVE, non-expired plan, otherwise null.' parameters: - description: Role filter in: query diff --git a/internal/domain/user.go b/internal/domain/user.go index 79f251d..9529f2c 100644 --- a/internal/domain/user.go +++ b/internal/domain/user.go @@ -121,7 +121,7 @@ type UserProfileResponse struct { CreatedAt time.Time `json:"created_at"` UpdatedAt *time.Time `json:"updated_at,omitempty"` - ActiveSubscription *UserSubscriptionSummary `json:"active_subscription,omitempty"` + ActiveSubscription *UserSubscriptionSummary `json:"active_subscription"` } type UserFilter struct { diff --git a/internal/web_server/handlers/user.go b/internal/web_server/handlers/user.go index a91bbbe..9721852 100644 --- a/internal/web_server/handlers/user.go +++ b/internal/web_server/handlers/user.go @@ -423,7 +423,7 @@ func (h *Handler) CheckUserPending(c *fiber.Ctx) error { // GetAllUsers godoc // @Summary Get all users -// @Description Get users with optional filters. Each user may include active_subscription when they have a current ACTIVE, non-expired plan. +// @Description Get users with optional filters. Each user includes active_subscription: an object when they have a current ACTIVE, non-expired plan, otherwise null. // @Tags user // @Accept json // @Produce json