mirror of https://gitee.com/answerdev/answer.git
update tag-detail template
This commit is contained in:
parent
640ae6e3b9
commit
491911a83d
247
docs/docs.go
247
docs/docs.go
|
@ -16,6 +16,22 @@ const docTemplate = `{
|
||||||
"host": "{{.Host}}",
|
"host": "{{.Host}}",
|
||||||
"basePath": "{{.BasePath}}",
|
"basePath": "{{.BasePath}}",
|
||||||
"paths": {
|
"paths": {
|
||||||
|
"/": {
|
||||||
|
"get": {
|
||||||
|
"description": "if config file not exist try to redirect to install page",
|
||||||
|
"consumes": [
|
||||||
|
"application/json"
|
||||||
|
],
|
||||||
|
"produces": [
|
||||||
|
"application/json"
|
||||||
|
],
|
||||||
|
"tags": [
|
||||||
|
"installation"
|
||||||
|
],
|
||||||
|
"summary": "if config file not exist try to redirect to install page",
|
||||||
|
"responses": {}
|
||||||
|
}
|
||||||
|
},
|
||||||
"/answer/admin/api/answer/page": {
|
"/answer/admin/api/answer/page": {
|
||||||
"get": {
|
"get": {
|
||||||
"security": [
|
"security": [
|
||||||
|
@ -2687,7 +2703,7 @@ const docTemplate = `{
|
||||||
"application/json"
|
"application/json"
|
||||||
],
|
],
|
||||||
"tags": [
|
"tags": [
|
||||||
"api-question"
|
"Question"
|
||||||
],
|
],
|
||||||
"summary": "UserTop",
|
"summary": "UserTop",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
|
@ -2910,7 +2926,7 @@ const docTemplate = `{
|
||||||
"application/json"
|
"application/json"
|
||||||
],
|
],
|
||||||
"tags": [
|
"tags": [
|
||||||
"api-question"
|
"Question"
|
||||||
],
|
],
|
||||||
"summary": "update question",
|
"summary": "update question",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
|
@ -2947,7 +2963,7 @@ const docTemplate = `{
|
||||||
"application/json"
|
"application/json"
|
||||||
],
|
],
|
||||||
"tags": [
|
"tags": [
|
||||||
"api-question"
|
"Question"
|
||||||
],
|
],
|
||||||
"summary": "add question",
|
"summary": "add question",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
|
@ -2984,7 +3000,7 @@ const docTemplate = `{
|
||||||
"application/json"
|
"application/json"
|
||||||
],
|
],
|
||||||
"tags": [
|
"tags": [
|
||||||
"api-question"
|
"Question"
|
||||||
],
|
],
|
||||||
"summary": "delete question",
|
"summary": "delete question",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
|
@ -3023,7 +3039,7 @@ const docTemplate = `{
|
||||||
"application/json"
|
"application/json"
|
||||||
],
|
],
|
||||||
"tags": [
|
"tags": [
|
||||||
"api-question"
|
"Question"
|
||||||
],
|
],
|
||||||
"summary": "close question msg list",
|
"summary": "close question msg list",
|
||||||
"responses": {
|
"responses": {
|
||||||
|
@ -3043,7 +3059,7 @@ const docTemplate = `{
|
||||||
"ApiKeyAuth": []
|
"ApiKeyAuth": []
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"description": "GetQuestion Question",
|
"description": "get question details",
|
||||||
"consumes": [
|
"consumes": [
|
||||||
"application/json"
|
"application/json"
|
||||||
],
|
],
|
||||||
|
@ -3051,9 +3067,9 @@ const docTemplate = `{
|
||||||
"application/json"
|
"application/json"
|
||||||
],
|
],
|
||||||
"tags": [
|
"tags": [
|
||||||
"api-question"
|
"Question"
|
||||||
],
|
],
|
||||||
"summary": "GetQuestion Question",
|
"summary": "get question details",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
"type": "string",
|
"type": "string",
|
||||||
|
@ -3076,7 +3092,7 @@ const docTemplate = `{
|
||||||
},
|
},
|
||||||
"/answer/api/v1/question/page": {
|
"/answer/api/v1/question/page": {
|
||||||
"get": {
|
"get": {
|
||||||
"description": "SearchQuestionList \u003cbr\u003e \"order\" Enums(newest, active,frequent,score,unanswered)",
|
"description": "get questions by page",
|
||||||
"consumes": [
|
"consumes": [
|
||||||
"application/json"
|
"application/json"
|
||||||
],
|
],
|
||||||
|
@ -3084,17 +3100,17 @@ const docTemplate = `{
|
||||||
"application/json"
|
"application/json"
|
||||||
],
|
],
|
||||||
"tags": [
|
"tags": [
|
||||||
"api-question"
|
"Question"
|
||||||
],
|
],
|
||||||
"summary": "SearchQuestionList",
|
"summary": "get questions by page",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
"description": "QuestionSearch",
|
"description": "QuestionPageReq",
|
||||||
"name": "data",
|
"name": "data",
|
||||||
"in": "body",
|
"in": "body",
|
||||||
"required": true,
|
"required": true,
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/schema.QuestionSearch"
|
"$ref": "#/definitions/schema.QuestionPageReq"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
@ -3102,7 +3118,34 @@ const docTemplate = `{
|
||||||
"200": {
|
"200": {
|
||||||
"description": "OK",
|
"description": "OK",
|
||||||
"schema": {
|
"schema": {
|
||||||
"type": "string"
|
"allOf": [
|
||||||
|
{
|
||||||
|
"$ref": "#/definitions/handler.RespBody"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"data": {
|
||||||
|
"allOf": [
|
||||||
|
{
|
||||||
|
"$ref": "#/definitions/pager.PageModel"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"list": {
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"$ref": "#/definitions/schema.QuestionPageResp"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3123,7 +3166,7 @@ const docTemplate = `{
|
||||||
"application/json"
|
"application/json"
|
||||||
],
|
],
|
||||||
"tags": [
|
"tags": [
|
||||||
"api-question"
|
"Question"
|
||||||
],
|
],
|
||||||
"summary": "reopen question",
|
"summary": "reopen question",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
|
@ -3147,40 +3190,6 @@ const docTemplate = `{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"/answer/api/v1/question/search": {
|
|
||||||
"post": {
|
|
||||||
"description": "SearchQuestionList",
|
|
||||||
"consumes": [
|
|
||||||
"application/json"
|
|
||||||
],
|
|
||||||
"produces": [
|
|
||||||
"application/json"
|
|
||||||
],
|
|
||||||
"tags": [
|
|
||||||
"api-question"
|
|
||||||
],
|
|
||||||
"summary": "SearchQuestionList",
|
|
||||||
"parameters": [
|
|
||||||
{
|
|
||||||
"description": "QuestionSearch",
|
|
||||||
"name": "data",
|
|
||||||
"in": "body",
|
|
||||||
"required": true,
|
|
||||||
"schema": {
|
|
||||||
"$ref": "#/definitions/schema.QuestionSearch"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"responses": {
|
|
||||||
"200": {
|
|
||||||
"description": "OK",
|
|
||||||
"schema": {
|
|
||||||
"type": "string"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"/answer/api/v1/question/similar": {
|
"/answer/api/v1/question/similar": {
|
||||||
"get": {
|
"get": {
|
||||||
"security": [
|
"security": [
|
||||||
|
@ -3196,7 +3205,7 @@ const docTemplate = `{
|
||||||
"application/json"
|
"application/json"
|
||||||
],
|
],
|
||||||
"tags": [
|
"tags": [
|
||||||
"api-question"
|
"Question"
|
||||||
],
|
],
|
||||||
"summary": "add question title like",
|
"summary": "add question title like",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
|
@ -3229,7 +3238,7 @@ const docTemplate = `{
|
||||||
"application/json"
|
"application/json"
|
||||||
],
|
],
|
||||||
"tags": [
|
"tags": [
|
||||||
"api-question"
|
"Question"
|
||||||
],
|
],
|
||||||
"summary": "Search Similar Question",
|
"summary": "Search Similar Question",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
|
@ -3267,7 +3276,7 @@ const docTemplate = `{
|
||||||
"application/json"
|
"application/json"
|
||||||
],
|
],
|
||||||
"tags": [
|
"tags": [
|
||||||
"api-question"
|
"Question"
|
||||||
],
|
],
|
||||||
"summary": "Close question",
|
"summary": "Close question",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
|
@ -4231,6 +4240,29 @@ const docTemplate = `{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"/answer/api/v1/user/email/notification": {
|
||||||
|
"put": {
|
||||||
|
"description": "unsubscribe email notification",
|
||||||
|
"consumes": [
|
||||||
|
"application/json"
|
||||||
|
],
|
||||||
|
"produces": [
|
||||||
|
"application/json"
|
||||||
|
],
|
||||||
|
"tags": [
|
||||||
|
"User"
|
||||||
|
],
|
||||||
|
"summary": "unsubscribe email notification",
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "OK",
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/definitions/handler.RespBody"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"/answer/api/v1/user/email/verification": {
|
"/answer/api/v1/user/email/verification": {
|
||||||
"post": {
|
"post": {
|
||||||
"description": "UserVerifyEmail",
|
"description": "UserVerifyEmail",
|
||||||
|
@ -5119,7 +5151,7 @@ const docTemplate = `{
|
||||||
"application/json"
|
"application/json"
|
||||||
],
|
],
|
||||||
"tags": [
|
"tags": [
|
||||||
"api-question"
|
"Question"
|
||||||
],
|
],
|
||||||
"summary": "UserList",
|
"summary": "UserList",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
|
@ -6593,27 +6625,112 @@ const docTemplate = `{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"schema.QuestionSearch": {
|
"schema.QuestionPageReq": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
"order": {
|
"orderCond": {
|
||||||
"description": "Search order by",
|
"type": "string",
|
||||||
"type": "string"
|
"enum": [
|
||||||
|
"newest",
|
||||||
|
"active",
|
||||||
|
"frequent",
|
||||||
|
"score",
|
||||||
|
"unanswered"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"page": {
|
"page": {
|
||||||
"description": "Query number of pages",
|
"type": "integer",
|
||||||
"type": "integer"
|
"minimum": 1
|
||||||
},
|
},
|
||||||
"page_size": {
|
"pageSize": {
|
||||||
"description": "Search page size",
|
"type": "integer",
|
||||||
"type": "integer"
|
"minimum": 1
|
||||||
},
|
},
|
||||||
"tag": {
|
"tag": {
|
||||||
"description": "Tags []string ` + "`" + `json:\"tags\" form:\"tags\"` + "`" + ` // Search tag",
|
"type": "string",
|
||||||
"type": "string"
|
"maxLength": 100
|
||||||
|
},
|
||||||
|
"username": {
|
||||||
|
"type": "string",
|
||||||
|
"maxLength": 100
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"schema.QuestionPageResp": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"accepted_answer_id": {
|
||||||
|
"description": "answer information",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"answer_count": {
|
||||||
|
"type": "integer"
|
||||||
|
},
|
||||||
|
"collection_count": {
|
||||||
|
"type": "integer"
|
||||||
|
},
|
||||||
|
"description": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"follow_count": {
|
||||||
|
"type": "integer"
|
||||||
|
},
|
||||||
|
"id": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"last_answer_id": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"operated_at": {
|
||||||
|
"description": "operator information",
|
||||||
|
"type": "integer"
|
||||||
|
},
|
||||||
|
"operation_type": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"operator": {
|
||||||
|
"$ref": "#/definitions/schema.QuestionPageRespOperator"
|
||||||
|
},
|
||||||
|
"status": {
|
||||||
|
"type": "integer"
|
||||||
|
},
|
||||||
|
"tags": {
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"$ref": "#/definitions/schema.TagResp"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"title": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"unique_view_count": {
|
||||||
|
"type": "integer"
|
||||||
|
},
|
||||||
|
"url_title": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"view_count": {
|
||||||
|
"description": "question statistical information",
|
||||||
|
"type": "integer"
|
||||||
|
},
|
||||||
|
"vote_count": {
|
||||||
|
"type": "integer"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"schema.QuestionPageRespOperator": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"display_name": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"id": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"rank": {
|
||||||
|
"type": "integer"
|
||||||
},
|
},
|
||||||
"username": {
|
"username": {
|
||||||
"description": "Search username",
|
|
||||||
"type": "string"
|
"type": "string"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,6 +4,22 @@
|
||||||
"contact": {}
|
"contact": {}
|
||||||
},
|
},
|
||||||
"paths": {
|
"paths": {
|
||||||
|
"/": {
|
||||||
|
"get": {
|
||||||
|
"description": "if config file not exist try to redirect to install page",
|
||||||
|
"consumes": [
|
||||||
|
"application/json"
|
||||||
|
],
|
||||||
|
"produces": [
|
||||||
|
"application/json"
|
||||||
|
],
|
||||||
|
"tags": [
|
||||||
|
"installation"
|
||||||
|
],
|
||||||
|
"summary": "if config file not exist try to redirect to install page",
|
||||||
|
"responses": {}
|
||||||
|
}
|
||||||
|
},
|
||||||
"/answer/admin/api/answer/page": {
|
"/answer/admin/api/answer/page": {
|
||||||
"get": {
|
"get": {
|
||||||
"security": [
|
"security": [
|
||||||
|
@ -2675,7 +2691,7 @@
|
||||||
"application/json"
|
"application/json"
|
||||||
],
|
],
|
||||||
"tags": [
|
"tags": [
|
||||||
"api-question"
|
"Question"
|
||||||
],
|
],
|
||||||
"summary": "UserTop",
|
"summary": "UserTop",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
|
@ -2898,7 +2914,7 @@
|
||||||
"application/json"
|
"application/json"
|
||||||
],
|
],
|
||||||
"tags": [
|
"tags": [
|
||||||
"api-question"
|
"Question"
|
||||||
],
|
],
|
||||||
"summary": "update question",
|
"summary": "update question",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
|
@ -2935,7 +2951,7 @@
|
||||||
"application/json"
|
"application/json"
|
||||||
],
|
],
|
||||||
"tags": [
|
"tags": [
|
||||||
"api-question"
|
"Question"
|
||||||
],
|
],
|
||||||
"summary": "add question",
|
"summary": "add question",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
|
@ -2972,7 +2988,7 @@
|
||||||
"application/json"
|
"application/json"
|
||||||
],
|
],
|
||||||
"tags": [
|
"tags": [
|
||||||
"api-question"
|
"Question"
|
||||||
],
|
],
|
||||||
"summary": "delete question",
|
"summary": "delete question",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
|
@ -3011,7 +3027,7 @@
|
||||||
"application/json"
|
"application/json"
|
||||||
],
|
],
|
||||||
"tags": [
|
"tags": [
|
||||||
"api-question"
|
"Question"
|
||||||
],
|
],
|
||||||
"summary": "close question msg list",
|
"summary": "close question msg list",
|
||||||
"responses": {
|
"responses": {
|
||||||
|
@ -3031,7 +3047,7 @@
|
||||||
"ApiKeyAuth": []
|
"ApiKeyAuth": []
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"description": "GetQuestion Question",
|
"description": "get question details",
|
||||||
"consumes": [
|
"consumes": [
|
||||||
"application/json"
|
"application/json"
|
||||||
],
|
],
|
||||||
|
@ -3039,9 +3055,9 @@
|
||||||
"application/json"
|
"application/json"
|
||||||
],
|
],
|
||||||
"tags": [
|
"tags": [
|
||||||
"api-question"
|
"Question"
|
||||||
],
|
],
|
||||||
"summary": "GetQuestion Question",
|
"summary": "get question details",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
"type": "string",
|
"type": "string",
|
||||||
|
@ -3064,7 +3080,7 @@
|
||||||
},
|
},
|
||||||
"/answer/api/v1/question/page": {
|
"/answer/api/v1/question/page": {
|
||||||
"get": {
|
"get": {
|
||||||
"description": "SearchQuestionList \u003cbr\u003e \"order\" Enums(newest, active,frequent,score,unanswered)",
|
"description": "get questions by page",
|
||||||
"consumes": [
|
"consumes": [
|
||||||
"application/json"
|
"application/json"
|
||||||
],
|
],
|
||||||
|
@ -3072,17 +3088,17 @@
|
||||||
"application/json"
|
"application/json"
|
||||||
],
|
],
|
||||||
"tags": [
|
"tags": [
|
||||||
"api-question"
|
"Question"
|
||||||
],
|
],
|
||||||
"summary": "SearchQuestionList",
|
"summary": "get questions by page",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
"description": "QuestionSearch",
|
"description": "QuestionPageReq",
|
||||||
"name": "data",
|
"name": "data",
|
||||||
"in": "body",
|
"in": "body",
|
||||||
"required": true,
|
"required": true,
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/schema.QuestionSearch"
|
"$ref": "#/definitions/schema.QuestionPageReq"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
@ -3090,7 +3106,34 @@
|
||||||
"200": {
|
"200": {
|
||||||
"description": "OK",
|
"description": "OK",
|
||||||
"schema": {
|
"schema": {
|
||||||
"type": "string"
|
"allOf": [
|
||||||
|
{
|
||||||
|
"$ref": "#/definitions/handler.RespBody"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"data": {
|
||||||
|
"allOf": [
|
||||||
|
{
|
||||||
|
"$ref": "#/definitions/pager.PageModel"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"list": {
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"$ref": "#/definitions/schema.QuestionPageResp"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3111,7 +3154,7 @@
|
||||||
"application/json"
|
"application/json"
|
||||||
],
|
],
|
||||||
"tags": [
|
"tags": [
|
||||||
"api-question"
|
"Question"
|
||||||
],
|
],
|
||||||
"summary": "reopen question",
|
"summary": "reopen question",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
|
@ -3135,40 +3178,6 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"/answer/api/v1/question/search": {
|
|
||||||
"post": {
|
|
||||||
"description": "SearchQuestionList",
|
|
||||||
"consumes": [
|
|
||||||
"application/json"
|
|
||||||
],
|
|
||||||
"produces": [
|
|
||||||
"application/json"
|
|
||||||
],
|
|
||||||
"tags": [
|
|
||||||
"api-question"
|
|
||||||
],
|
|
||||||
"summary": "SearchQuestionList",
|
|
||||||
"parameters": [
|
|
||||||
{
|
|
||||||
"description": "QuestionSearch",
|
|
||||||
"name": "data",
|
|
||||||
"in": "body",
|
|
||||||
"required": true,
|
|
||||||
"schema": {
|
|
||||||
"$ref": "#/definitions/schema.QuestionSearch"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"responses": {
|
|
||||||
"200": {
|
|
||||||
"description": "OK",
|
|
||||||
"schema": {
|
|
||||||
"type": "string"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"/answer/api/v1/question/similar": {
|
"/answer/api/v1/question/similar": {
|
||||||
"get": {
|
"get": {
|
||||||
"security": [
|
"security": [
|
||||||
|
@ -3184,7 +3193,7 @@
|
||||||
"application/json"
|
"application/json"
|
||||||
],
|
],
|
||||||
"tags": [
|
"tags": [
|
||||||
"api-question"
|
"Question"
|
||||||
],
|
],
|
||||||
"summary": "add question title like",
|
"summary": "add question title like",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
|
@ -3217,7 +3226,7 @@
|
||||||
"application/json"
|
"application/json"
|
||||||
],
|
],
|
||||||
"tags": [
|
"tags": [
|
||||||
"api-question"
|
"Question"
|
||||||
],
|
],
|
||||||
"summary": "Search Similar Question",
|
"summary": "Search Similar Question",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
|
@ -3255,7 +3264,7 @@
|
||||||
"application/json"
|
"application/json"
|
||||||
],
|
],
|
||||||
"tags": [
|
"tags": [
|
||||||
"api-question"
|
"Question"
|
||||||
],
|
],
|
||||||
"summary": "Close question",
|
"summary": "Close question",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
|
@ -4219,6 +4228,29 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"/answer/api/v1/user/email/notification": {
|
||||||
|
"put": {
|
||||||
|
"description": "unsubscribe email notification",
|
||||||
|
"consumes": [
|
||||||
|
"application/json"
|
||||||
|
],
|
||||||
|
"produces": [
|
||||||
|
"application/json"
|
||||||
|
],
|
||||||
|
"tags": [
|
||||||
|
"User"
|
||||||
|
],
|
||||||
|
"summary": "unsubscribe email notification",
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "OK",
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/definitions/handler.RespBody"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"/answer/api/v1/user/email/verification": {
|
"/answer/api/v1/user/email/verification": {
|
||||||
"post": {
|
"post": {
|
||||||
"description": "UserVerifyEmail",
|
"description": "UserVerifyEmail",
|
||||||
|
@ -5107,7 +5139,7 @@
|
||||||
"application/json"
|
"application/json"
|
||||||
],
|
],
|
||||||
"tags": [
|
"tags": [
|
||||||
"api-question"
|
"Question"
|
||||||
],
|
],
|
||||||
"summary": "UserList",
|
"summary": "UserList",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
|
@ -6581,27 +6613,112 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"schema.QuestionSearch": {
|
"schema.QuestionPageReq": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
"order": {
|
"orderCond": {
|
||||||
"description": "Search order by",
|
"type": "string",
|
||||||
"type": "string"
|
"enum": [
|
||||||
|
"newest",
|
||||||
|
"active",
|
||||||
|
"frequent",
|
||||||
|
"score",
|
||||||
|
"unanswered"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"page": {
|
"page": {
|
||||||
"description": "Query number of pages",
|
"type": "integer",
|
||||||
"type": "integer"
|
"minimum": 1
|
||||||
},
|
},
|
||||||
"page_size": {
|
"pageSize": {
|
||||||
"description": "Search page size",
|
"type": "integer",
|
||||||
"type": "integer"
|
"minimum": 1
|
||||||
},
|
},
|
||||||
"tag": {
|
"tag": {
|
||||||
"description": "Tags []string `json:\"tags\" form:\"tags\"` // Search tag",
|
"type": "string",
|
||||||
"type": "string"
|
"maxLength": 100
|
||||||
|
},
|
||||||
|
"username": {
|
||||||
|
"type": "string",
|
||||||
|
"maxLength": 100
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"schema.QuestionPageResp": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"accepted_answer_id": {
|
||||||
|
"description": "answer information",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"answer_count": {
|
||||||
|
"type": "integer"
|
||||||
|
},
|
||||||
|
"collection_count": {
|
||||||
|
"type": "integer"
|
||||||
|
},
|
||||||
|
"description": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"follow_count": {
|
||||||
|
"type": "integer"
|
||||||
|
},
|
||||||
|
"id": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"last_answer_id": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"operated_at": {
|
||||||
|
"description": "operator information",
|
||||||
|
"type": "integer"
|
||||||
|
},
|
||||||
|
"operation_type": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"operator": {
|
||||||
|
"$ref": "#/definitions/schema.QuestionPageRespOperator"
|
||||||
|
},
|
||||||
|
"status": {
|
||||||
|
"type": "integer"
|
||||||
|
},
|
||||||
|
"tags": {
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"$ref": "#/definitions/schema.TagResp"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"title": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"unique_view_count": {
|
||||||
|
"type": "integer"
|
||||||
|
},
|
||||||
|
"url_title": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"view_count": {
|
||||||
|
"description": "question statistical information",
|
||||||
|
"type": "integer"
|
||||||
|
},
|
||||||
|
"vote_count": {
|
||||||
|
"type": "integer"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"schema.QuestionPageRespOperator": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"display_name": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"id": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"rank": {
|
||||||
|
"type": "integer"
|
||||||
},
|
},
|
||||||
"username": {
|
"username": {
|
||||||
"description": "Search username",
|
|
||||||
"type": "string"
|
"type": "string"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1004,23 +1004,80 @@ definitions:
|
||||||
- tags
|
- tags
|
||||||
- title
|
- title
|
||||||
type: object
|
type: object
|
||||||
schema.QuestionSearch:
|
schema.QuestionPageReq:
|
||||||
properties:
|
properties:
|
||||||
order:
|
orderCond:
|
||||||
description: Search order by
|
enum:
|
||||||
|
- newest
|
||||||
|
- active
|
||||||
|
- frequent
|
||||||
|
- score
|
||||||
|
- unanswered
|
||||||
type: string
|
type: string
|
||||||
page:
|
page:
|
||||||
description: Query number of pages
|
minimum: 1
|
||||||
type: integer
|
type: integer
|
||||||
page_size:
|
pageSize:
|
||||||
description: Search page size
|
minimum: 1
|
||||||
type: integer
|
type: integer
|
||||||
tag:
|
tag:
|
||||||
description: Tags []string `json:"tags" form:"tags"` // Search
|
maxLength: 100
|
||||||
tag
|
|
||||||
type: string
|
type: string
|
||||||
username:
|
username:
|
||||||
description: Search username
|
maxLength: 100
|
||||||
|
type: string
|
||||||
|
type: object
|
||||||
|
schema.QuestionPageResp:
|
||||||
|
properties:
|
||||||
|
accepted_answer_id:
|
||||||
|
description: answer information
|
||||||
|
type: string
|
||||||
|
answer_count:
|
||||||
|
type: integer
|
||||||
|
collection_count:
|
||||||
|
type: integer
|
||||||
|
description:
|
||||||
|
type: string
|
||||||
|
follow_count:
|
||||||
|
type: integer
|
||||||
|
id:
|
||||||
|
type: string
|
||||||
|
last_answer_id:
|
||||||
|
type: string
|
||||||
|
operated_at:
|
||||||
|
description: operator information
|
||||||
|
type: integer
|
||||||
|
operation_type:
|
||||||
|
type: string
|
||||||
|
operator:
|
||||||
|
$ref: '#/definitions/schema.QuestionPageRespOperator'
|
||||||
|
status:
|
||||||
|
type: integer
|
||||||
|
tags:
|
||||||
|
items:
|
||||||
|
$ref: '#/definitions/schema.TagResp'
|
||||||
|
type: array
|
||||||
|
title:
|
||||||
|
type: string
|
||||||
|
unique_view_count:
|
||||||
|
type: integer
|
||||||
|
url_title:
|
||||||
|
type: string
|
||||||
|
view_count:
|
||||||
|
description: question statistical information
|
||||||
|
type: integer
|
||||||
|
vote_count:
|
||||||
|
type: integer
|
||||||
|
type: object
|
||||||
|
schema.QuestionPageRespOperator:
|
||||||
|
properties:
|
||||||
|
display_name:
|
||||||
|
type: string
|
||||||
|
id:
|
||||||
|
type: string
|
||||||
|
rank:
|
||||||
|
type: integer
|
||||||
|
username:
|
||||||
type: string
|
type: string
|
||||||
type: object
|
type: object
|
||||||
schema.QuestionUpdate:
|
schema.QuestionUpdate:
|
||||||
|
@ -1886,6 +1943,17 @@ definitions:
|
||||||
info:
|
info:
|
||||||
contact: {}
|
contact: {}
|
||||||
paths:
|
paths:
|
||||||
|
/:
|
||||||
|
get:
|
||||||
|
consumes:
|
||||||
|
- application/json
|
||||||
|
description: if config file not exist try to redirect to install page
|
||||||
|
produces:
|
||||||
|
- application/json
|
||||||
|
responses: {}
|
||||||
|
summary: if config file not exist try to redirect to install page
|
||||||
|
tags:
|
||||||
|
- installation
|
||||||
/answer/admin/api/answer/page:
|
/answer/admin/api/answer/page:
|
||||||
get:
|
get:
|
||||||
consumes:
|
consumes:
|
||||||
|
@ -3517,7 +3585,7 @@ paths:
|
||||||
- ApiKeyAuth: []
|
- ApiKeyAuth: []
|
||||||
summary: UserTop
|
summary: UserTop
|
||||||
tags:
|
tags:
|
||||||
- api-question
|
- Question
|
||||||
/answer/api/v1/personal/rank/page:
|
/answer/api/v1/personal/rank/page:
|
||||||
get:
|
get:
|
||||||
description: user personal rank list
|
description: user personal rank list
|
||||||
|
@ -3645,7 +3713,7 @@ paths:
|
||||||
- ApiKeyAuth: []
|
- ApiKeyAuth: []
|
||||||
summary: delete question
|
summary: delete question
|
||||||
tags:
|
tags:
|
||||||
- api-question
|
- Question
|
||||||
post:
|
post:
|
||||||
consumes:
|
consumes:
|
||||||
- application/json
|
- application/json
|
||||||
|
@ -3668,7 +3736,7 @@ paths:
|
||||||
- ApiKeyAuth: []
|
- ApiKeyAuth: []
|
||||||
summary: add question
|
summary: add question
|
||||||
tags:
|
tags:
|
||||||
- api-question
|
- Question
|
||||||
put:
|
put:
|
||||||
consumes:
|
consumes:
|
||||||
- application/json
|
- application/json
|
||||||
|
@ -3691,7 +3759,7 @@ paths:
|
||||||
- ApiKeyAuth: []
|
- ApiKeyAuth: []
|
||||||
summary: update question
|
summary: update question
|
||||||
tags:
|
tags:
|
||||||
- api-question
|
- Question
|
||||||
/answer/api/v1/question/closemsglist:
|
/answer/api/v1/question/closemsglist:
|
||||||
get:
|
get:
|
||||||
consumes:
|
consumes:
|
||||||
|
@ -3708,12 +3776,12 @@ paths:
|
||||||
- ApiKeyAuth: []
|
- ApiKeyAuth: []
|
||||||
summary: close question msg list
|
summary: close question msg list
|
||||||
tags:
|
tags:
|
||||||
- api-question
|
- Question
|
||||||
/answer/api/v1/question/info:
|
/answer/api/v1/question/info:
|
||||||
get:
|
get:
|
||||||
consumes:
|
consumes:
|
||||||
- application/json
|
- application/json
|
||||||
description: GetQuestion Question
|
description: get question details
|
||||||
parameters:
|
parameters:
|
||||||
- default: "1"
|
- default: "1"
|
||||||
description: Question TagID
|
description: Question TagID
|
||||||
|
@ -3730,31 +3798,43 @@ paths:
|
||||||
type: string
|
type: string
|
||||||
security:
|
security:
|
||||||
- ApiKeyAuth: []
|
- ApiKeyAuth: []
|
||||||
summary: GetQuestion Question
|
summary: get question details
|
||||||
tags:
|
tags:
|
||||||
- api-question
|
- Question
|
||||||
/answer/api/v1/question/page:
|
/answer/api/v1/question/page:
|
||||||
get:
|
get:
|
||||||
consumes:
|
consumes:
|
||||||
- application/json
|
- application/json
|
||||||
description: SearchQuestionList <br> "order" Enums(newest, active,frequent,score,unanswered)
|
description: get questions by page
|
||||||
parameters:
|
parameters:
|
||||||
- description: QuestionSearch
|
- description: QuestionPageReq
|
||||||
in: body
|
in: body
|
||||||
name: data
|
name: data
|
||||||
required: true
|
required: true
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/schema.QuestionSearch'
|
$ref: '#/definitions/schema.QuestionPageReq'
|
||||||
produces:
|
produces:
|
||||||
- application/json
|
- application/json
|
||||||
responses:
|
responses:
|
||||||
"200":
|
"200":
|
||||||
description: OK
|
description: OK
|
||||||
schema:
|
schema:
|
||||||
type: string
|
allOf:
|
||||||
summary: SearchQuestionList
|
- $ref: '#/definitions/handler.RespBody'
|
||||||
|
- properties:
|
||||||
|
data:
|
||||||
|
allOf:
|
||||||
|
- $ref: '#/definitions/pager.PageModel'
|
||||||
|
- properties:
|
||||||
|
list:
|
||||||
|
items:
|
||||||
|
$ref: '#/definitions/schema.QuestionPageResp'
|
||||||
|
type: array
|
||||||
|
type: object
|
||||||
|
type: object
|
||||||
|
summary: get questions by page
|
||||||
tags:
|
tags:
|
||||||
- api-question
|
- Question
|
||||||
/answer/api/v1/question/reopen:
|
/answer/api/v1/question/reopen:
|
||||||
put:
|
put:
|
||||||
consumes:
|
consumes:
|
||||||
|
@ -3778,29 +3858,7 @@ paths:
|
||||||
- ApiKeyAuth: []
|
- ApiKeyAuth: []
|
||||||
summary: reopen question
|
summary: reopen question
|
||||||
tags:
|
tags:
|
||||||
- api-question
|
- Question
|
||||||
/answer/api/v1/question/search:
|
|
||||||
post:
|
|
||||||
consumes:
|
|
||||||
- application/json
|
|
||||||
description: SearchQuestionList
|
|
||||||
parameters:
|
|
||||||
- description: QuestionSearch
|
|
||||||
in: body
|
|
||||||
name: data
|
|
||||||
required: true
|
|
||||||
schema:
|
|
||||||
$ref: '#/definitions/schema.QuestionSearch'
|
|
||||||
produces:
|
|
||||||
- application/json
|
|
||||||
responses:
|
|
||||||
"200":
|
|
||||||
description: OK
|
|
||||||
schema:
|
|
||||||
type: string
|
|
||||||
summary: SearchQuestionList
|
|
||||||
tags:
|
|
||||||
- api-question
|
|
||||||
/answer/api/v1/question/similar:
|
/answer/api/v1/question/similar:
|
||||||
get:
|
get:
|
||||||
consumes:
|
consumes:
|
||||||
|
@ -3824,7 +3882,7 @@ paths:
|
||||||
- ApiKeyAuth: []
|
- ApiKeyAuth: []
|
||||||
summary: add question title like
|
summary: add question title like
|
||||||
tags:
|
tags:
|
||||||
- api-question
|
- Question
|
||||||
/answer/api/v1/question/similar/tag:
|
/answer/api/v1/question/similar/tag:
|
||||||
get:
|
get:
|
||||||
consumes:
|
consumes:
|
||||||
|
@ -3846,7 +3904,7 @@ paths:
|
||||||
type: string
|
type: string
|
||||||
summary: Search Similar Question
|
summary: Search Similar Question
|
||||||
tags:
|
tags:
|
||||||
- api-question
|
- Question
|
||||||
/answer/api/v1/question/status:
|
/answer/api/v1/question/status:
|
||||||
put:
|
put:
|
||||||
consumes:
|
consumes:
|
||||||
|
@ -3870,7 +3928,7 @@ paths:
|
||||||
- ApiKeyAuth: []
|
- ApiKeyAuth: []
|
||||||
summary: Close question
|
summary: Close question
|
||||||
tags:
|
tags:
|
||||||
- api-question
|
- Question
|
||||||
/answer/api/v1/question/tags:
|
/answer/api/v1/question/tags:
|
||||||
get:
|
get:
|
||||||
description: get tag list
|
description: get tag list
|
||||||
|
@ -4439,6 +4497,21 @@ paths:
|
||||||
summary: send email to the user email then change their email
|
summary: send email to the user email then change their email
|
||||||
tags:
|
tags:
|
||||||
- User
|
- User
|
||||||
|
/answer/api/v1/user/email/notification:
|
||||||
|
put:
|
||||||
|
consumes:
|
||||||
|
- application/json
|
||||||
|
description: unsubscribe email notification
|
||||||
|
produces:
|
||||||
|
- application/json
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
description: OK
|
||||||
|
schema:
|
||||||
|
$ref: '#/definitions/handler.RespBody'
|
||||||
|
summary: unsubscribe email notification
|
||||||
|
tags:
|
||||||
|
- User
|
||||||
/answer/api/v1/user/email/verification:
|
/answer/api/v1/user/email/verification:
|
||||||
post:
|
post:
|
||||||
consumes:
|
consumes:
|
||||||
|
@ -5007,7 +5080,7 @@ paths:
|
||||||
- ApiKeyAuth: []
|
- ApiKeyAuth: []
|
||||||
summary: UserList
|
summary: UserList
|
||||||
tags:
|
tags:
|
||||||
- api-question
|
- Question
|
||||||
/robots.txt:
|
/robots.txt:
|
||||||
get:
|
get:
|
||||||
description: get site robots information
|
description: get site robots information
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
<!doctype html><html><head><meta charset="utf-8"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><link rel="manifest" href="/manifest.json"/><script defer="defer" src="/static/js/main.554b9f62.js"></script><link href="/static/css/main.401dc3ca.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"><div id="spin-mask" hidden><script>try{document.querySelector("#spin-mask").removeAttribute("hidden")}catch(e){}</script><style>@keyframes _doc-spin{to{transform:rotate(360deg)}}#spin-mask{position:fixed;top:0;right:0;bottom:0;left:0;background-color:#fff;z-index:9999}#spin-container{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}#spin-container .spinner{box-sizing:border-box;display:inline-block;width:2rem;height:2rem;vertical-align:-.125em;border:.25rem solid currentColor;border-right-color:transparent;color:rgba(108,117,125,.75);border-radius:50%;animation:.75s linear infinite _doc-spin}</style><div id="spin-container"><div class="spinner"></div></div></div></div></body></html>
|
<!doctype html><html><head><meta charset="utf-8"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><link rel="manifest" href="/manifest.json"/><script defer="defer" src="/static/js/main.fde484b3.js"></script><link href="/static/css/main.401dc3ca.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"><div id="spin-mask"><noscript><style>#spin-mask{display:none!important}</style></noscript><style>@keyframes _doc-spin{to{transform:rotate(360deg)}}#spin-mask{position:fixed;top:0;right:0;bottom:0;left:0;background-color:#fff;z-index:9999}#spin-container{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}#spin-container .spinner{box-sizing:border-box;display:inline-block;width:2rem;height:2rem;vertical-align:-.125em;border:.25rem solid currentColor;border-right-color:transparent;color:rgba(108,117,125,.75);border-radius:50%;animation:.75s linear infinite _doc-spin}</style><div id="spin-container"><div class="spinner"></div></div></div></div></body></html>
|
|
@ -34,21 +34,21 @@
|
||||||
>
|
>
|
||||||
<div class="d-flex">
|
<div class="d-flex">
|
||||||
<div class="text-secondary me-1">
|
<div class="text-secondary me-1">
|
||||||
<a href="/users/{{.UserInfo.Username}}"
|
<a href="/users/{{.Operator.Username}}"
|
||||||
><span class="me-1 text-break"
|
><span class="me-1 text-break"
|
||||||
>{{.UserInfo.DisplayName}}</span
|
>{{.Operator.DisplayName}}</span
|
||||||
></a
|
></a
|
||||||
><span class="fw-bold" title="Reputation"
|
><span class="fw-bold" title="Reputation"
|
||||||
>{{.UserInfo.Rank}}</span
|
>{{.Operator.Rank}}</span
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
•
|
•
|
||||||
<time
|
<time
|
||||||
class="text-secondary ms-1"
|
class="text-secondary ms-1"
|
||||||
datetime="{{timeFormatISO $.timezone .CreateTime}}"
|
datetime="{{timeFormatISO $.timezone .OperatedAt}}"
|
||||||
title="{{translatorTimeFormatLongDate $.language $.timezone .CreateTime}}"
|
title="{{translatorTimeFormatLongDate $.language $.timezone .OperatedAt}}"
|
||||||
>{{translator $.language "ui.question.asked"}}
|
>{{translator $.language "ui.question.asked"}}
|
||||||
{{translatorTimeFormat $.language $.timezone .CreateTime}}
|
{{translatorTimeFormat $.language $.timezone .OperatedAt}}
|
||||||
</time>
|
</time>
|
||||||
</div>
|
</div>
|
||||||
<div class="ms-0 ms-md-3 mt-2 mt-md-0">
|
<div class="ms-0 ms-md-3 mt-2 mt-md-0">
|
||||||
|
|
Loading…
Reference in New Issue