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.
fix(admin): modify the router url
LinkinStars10c91f96a3ec
diff --git a/docs/docs.go b/docs/docs.goindex 5313f29d..1e750bdb 100644--- a/docs/docs.go+++ b/docs/docs.go@@ -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": {"put": {"security": [@@ -1696,50 +1742,6 @@ const docTemplate = `{}},"/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": {"security": [{diff --git a/docs/swagger.json b/docs/swagger.jsonindex 493df700..09932b2c 100644--- a/docs/swagger.json+++ b/docs/swagger.json@@ -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": {"put": {"security": [@@ -1684,50 +1730,6 @@}},"/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": {"security": [{diff --git a/docs/swagger.yaml b/docs/swagger.yamlindex 9e6a6486..35b86cd7 100644--- a/docs/swagger.yaml+++ b/docs/swagger.yaml@@ -3232,6 +3232,32 @@ paths:summary: add usertags:- 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:put:consumes:@@ -3305,31 +3331,6 @@ paths:tags:- admin/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:- - adminpost:description: send user activationparameters:diff --git a/internal/controller_admin/user_backyard_controller.go b/internal/controller_admin/user_backyard_controller.goindex 646c8a1c..8e377757 100644--- a/internal/controller_admin/user_backyard_controller.go+++ b/internal/controller_admin/user_backyard_controller.go@@ -144,7 +144,7 @@ func (uc *UserAdminController) GetUserPage(ctx *gin.Context) {// @Produce json// @Param user_id query string true "user id"// @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) {req := &schema.GetUserActivationReq{}if handler.BindAndCheck(ctx, req) {