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": {
|
"/api/v1/users": {
|
||||||
"get": {
|
"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": [
|
"consumes": [
|
||||||
"application/json"
|
"application/json"
|
||||||
],
|
],
|
||||||
|
|
|
||||||
|
|
@ -8428,7 +8428,7 @@
|
||||||
},
|
},
|
||||||
"/api/v1/users": {
|
"/api/v1/users": {
|
||||||
"get": {
|
"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": [
|
"consumes": [
|
||||||
"application/json"
|
"application/json"
|
||||||
],
|
],
|
||||||
|
|
|
||||||
|
|
@ -8017,8 +8017,8 @@ paths:
|
||||||
get:
|
get:
|
||||||
consumes:
|
consumes:
|
||||||
- application/json
|
- application/json
|
||||||
description: Get users with optional filters. Each user may include active_subscription
|
description: 'Get users with optional filters. Each user includes active_subscription:
|
||||||
when they have a current ACTIVE, non-expired plan.
|
an object when they have a current ACTIVE, non-expired plan, otherwise null.'
|
||||||
parameters:
|
parameters:
|
||||||
- description: Role filter
|
- description: Role filter
|
||||||
in: query
|
in: query
|
||||||
|
|
|
||||||
|
|
@ -121,7 +121,7 @@ type UserProfileResponse struct {
|
||||||
CreatedAt time.Time `json:"created_at"`
|
CreatedAt time.Time `json:"created_at"`
|
||||||
UpdatedAt *time.Time `json:"updated_at,omitempty"`
|
UpdatedAt *time.Time `json:"updated_at,omitempty"`
|
||||||
|
|
||||||
ActiveSubscription *UserSubscriptionSummary `json:"active_subscription,omitempty"`
|
ActiveSubscription *UserSubscriptionSummary `json:"active_subscription"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type UserFilter struct {
|
type UserFilter struct {
|
||||||
|
|
|
||||||
|
|
@ -423,7 +423,7 @@ func (h *Handler) CheckUserPending(c *fiber.Ctx) error {
|
||||||
|
|
||||||
// GetAllUsers godoc
|
// GetAllUsers godoc
|
||||||
// @Summary Get all users
|
// @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
|
// @Tags user
|
||||||
// @Accept json
|
// @Accept json
|
||||||
// @Produce json
|
// @Produce json
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user