Always serialize active_subscription on profile responses.
Null encodes when there is no active plan so clients see explicit subscription state; Swagger regenerated and GET /users description updated accordingly. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
f824c16c64
commit
1e62510321
|
|
@ -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"
|
||||
],
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
],
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user