Skip to content

A Q&A platform software for teams at any scales. Whether it's a community forum, help center, or knowledge management platform, you can always count on Apache Answer.

feat(users): update api docs

LinkinStars1cd4e2740d0f
diff --git a/docs/docs.go b/docs/docs.go
index 10453be2..9c1519b1 100644
--- a/docs/docs.go
+++ b/docs/docs.go
@@ -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": {
diff --git a/docs/swagger.json b/docs/swagger.json
index a7a91bc9..cae66cf6 100644
--- a/docs/swagger.json
+++ b/docs/swagger.json
@@ -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": {
diff --git a/docs/swagger.yaml b/docs/swagger.yaml
index b7408b43..020550bd 100644
--- a/docs/swagger.yaml
+++ b/docs/swagger.yaml
@@ -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:
diff --git a/internal/controller_admin/user_backyard_controller.go b/internal/controller_admin/user_backyard_controller.go
index 3d4b73b5..0a8e6171 100644
--- a/internal/controller_admin/user_backyard_controller.go
+++ b/internal/controller_admin/user_backyard_controller.go
@@ -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) {