fix(admin): modify the router url

This commit is contained in:
LinkinStars 2023-07-11 15:15:59 +08:00
parent 3283e09c9a
commit 10c91f96a3
4 changed files with 119 additions and 114 deletions

View File

@ -1578,6 +1578,52 @@ const docTemplate = `{
} }
} }
}, },
"/answer/admin/api/user/activation": {
"get": {
"security": [
{
"ApiKeyAuth": []
}
],
"description": "get user activation",
"produces": [
"application/json"
],
"tags": [
"admin"
],
"summary": "get user activation",
"parameters": [
{
"type": "string",
"description": "user id",
"name": "user_id",
"in": "query",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"allOf": [
{
"$ref": "#/definitions/handler.RespBody"
},
{
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/schema.GetUserActivationResp"
}
}
}
]
}
}
}
}
},
"/answer/admin/api/user/password": { "/answer/admin/api/user/password": {
"put": { "put": {
"security": [ "security": [
@ -1696,50 +1742,6 @@ const docTemplate = `{
} }
}, },
"/answer/admin/api/users/activation": { "/answer/admin/api/users/activation": {
"get": {
"security": [
{
"ApiKeyAuth": []
}
],
"description": "get user activation",
"produces": [
"application/json"
],
"tags": [
"admin"
],
"summary": "get user activation",
"parameters": [
{
"type": "string",
"description": "user id",
"name": "user_id",
"in": "query",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"allOf": [
{
"$ref": "#/definitions/handler.RespBody"
},
{
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/schema.GetUserActivationResp"
}
}
}
]
}
}
}
},
"post": { "post": {
"security": [ "security": [
{ {

View File

@ -1566,6 +1566,52 @@
} }
} }
}, },
"/answer/admin/api/user/activation": {
"get": {
"security": [
{
"ApiKeyAuth": []
}
],
"description": "get user activation",
"produces": [
"application/json"
],
"tags": [
"admin"
],
"summary": "get user activation",
"parameters": [
{
"type": "string",
"description": "user id",
"name": "user_id",
"in": "query",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"allOf": [
{
"$ref": "#/definitions/handler.RespBody"
},
{
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/schema.GetUserActivationResp"
}
}
}
]
}
}
}
}
},
"/answer/admin/api/user/password": { "/answer/admin/api/user/password": {
"put": { "put": {
"security": [ "security": [
@ -1684,50 +1730,6 @@
} }
}, },
"/answer/admin/api/users/activation": { "/answer/admin/api/users/activation": {
"get": {
"security": [
{
"ApiKeyAuth": []
}
],
"description": "get user activation",
"produces": [
"application/json"
],
"tags": [
"admin"
],
"summary": "get user activation",
"parameters": [
{
"type": "string",
"description": "user id",
"name": "user_id",
"in": "query",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"allOf": [
{
"$ref": "#/definitions/handler.RespBody"
},
{
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/schema.GetUserActivationResp"
}
}
}
]
}
}
}
},
"post": { "post": {
"security": [ "security": [
{ {

View File

@ -3232,6 +3232,32 @@ paths:
summary: add user summary: add user
tags: tags:
- admin - admin
/answer/admin/api/user/activation:
get:
description: get user activation
parameters:
- description: user id
in: query
name: user_id
required: true
type: string
produces:
- application/json
responses:
"200":
description: OK
schema:
allOf:
- $ref: '#/definitions/handler.RespBody'
- properties:
data:
$ref: '#/definitions/schema.GetUserActivationResp'
type: object
security:
- ApiKeyAuth: []
summary: get user activation
tags:
- admin
/answer/admin/api/user/password: /answer/admin/api/user/password:
put: put:
consumes: consumes:
@ -3305,31 +3331,6 @@ paths:
tags: tags:
- admin - admin
/answer/admin/api/users/activation: /answer/admin/api/users/activation:
get:
description: get user activation
parameters:
- description: user id
in: query
name: user_id
required: true
type: string
produces:
- application/json
responses:
"200":
description: OK
schema:
allOf:
- $ref: '#/definitions/handler.RespBody'
- properties:
data:
$ref: '#/definitions/schema.GetUserActivationResp'
type: object
security:
- ApiKeyAuth: []
summary: get user activation
tags:
- admin
post: post:
description: send user activation description: send user activation
parameters: parameters:

View File

@ -144,7 +144,7 @@ func (uc *UserAdminController) GetUserPage(ctx *gin.Context) {
// @Produce json // @Produce json
// @Param user_id query string true "user id" // @Param user_id query string true "user id"
// @Success 200 {object} handler.RespBody{data=schema.GetUserActivationResp} // @Success 200 {object} handler.RespBody{data=schema.GetUserActivationResp}
// @Router /answer/admin/api/users/activation [get] // @Router /answer/admin/api/user/activation [get]
func (uc *UserAdminController) GetUserActivation(ctx *gin.Context) { func (uc *UserAdminController) GetUserActivation(ctx *gin.Context) {
req := &schema.GetUserActivationReq{} req := &schema.GetUserActivationReq{}
if handler.BindAndCheck(ctx, req) { if handler.BindAndCheck(ctx, req) {