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",
"required": true,
"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": {
"type": "object",
"properties": {

View File

@ -1754,7 +1754,7 @@
"in": "body",
"required": true,
"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": {
"type": "object",
"properties": {

View File

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

View File

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