feat(users): update api docs

This commit is contained in:
LinkinStars 2023-08-14 16:42:41 +08:00
parent 1211907b64
commit 1cd4e2740d
4 changed files with 28 additions and 4 deletions

View File

@ -1766,7 +1766,7 @@ const docTemplate = `{
"in": "body", "in": "body",
"required": true, "required": true,
"schema": { "schema": {
"$ref": "#/definitions/schema.AddUserReq" "$ref": "#/definitions/schema.AddUsersReq"
} }
} }
], ],
@ -6526,6 +6526,15 @@ const docTemplate = `{
} }
} }
}, },
"schema.AddUsersReq": {
"type": "object",
"properties": {
"users": {
"description": "users info line by line",
"type": "string"
}
}
},
"schema.AdminSetAnswerStatusRequest": { "schema.AdminSetAnswerStatusRequest": {
"type": "object", "type": "object",
"properties": { "properties": {

View File

@ -1754,7 +1754,7 @@
"in": "body", "in": "body",
"required": true, "required": true,
"schema": { "schema": {
"$ref": "#/definitions/schema.AddUserReq" "$ref": "#/definitions/schema.AddUsersReq"
} }
} }
], ],
@ -6514,6 +6514,15 @@
} }
} }
}, },
"schema.AddUsersReq": {
"type": "object",
"properties": {
"users": {
"description": "users info line by line",
"type": "string"
}
}
},
"schema.AdminSetAnswerStatusRequest": { "schema.AdminSetAnswerStatusRequest": {
"type": "object", "type": "object",
"properties": { "properties": {

View File

@ -230,6 +230,12 @@ definitions:
- email - email
- password - password
type: object type: object
schema.AddUsersReq:
properties:
users:
description: users info line by line
type: string
type: object
schema.AdminSetAnswerStatusRequest: schema.AdminSetAnswerStatusRequest:
properties: properties:
answer_id: answer_id:
@ -3392,7 +3398,7 @@ paths:
name: data name: data
required: true required: true
schema: schema:
$ref: '#/definitions/schema.AddUserReq' $ref: '#/definitions/schema.AddUsersReq'
produces: produces:
- application/json - application/json
responses: responses:

View File

@ -98,7 +98,7 @@ func (uc *UserAdminController) AddUser(ctx *gin.Context) {
// @Tags admin // @Tags admin
// @Accept json // @Accept json
// @Produce json // @Produce json
// @Param data body schema.AddUserReq true "user" // @Param data body schema.AddUsersReq true "user"
// @Success 200 {object} handler.RespBody // @Success 200 {object} handler.RespBody
// @Router /answer/admin/api/users [post] // @Router /answer/admin/api/users [post]
func (uc *UserAdminController) AddUsers(ctx *gin.Context) { func (uc *UserAdminController) AddUsers(ctx *gin.Context) {