fix(search_repo): question accept status error

This commit is contained in:
kumfo 2023-01-30 10:40:12 +08:00
parent 07a5f6c79c
commit 8b861b6fd7
4 changed files with 124 additions and 1 deletions

View File

@ -2911,6 +2911,45 @@ const docTemplate = `{
}
}
},
"/answer/api/v1/post/render": {
"post": {
"security": [
{
"ApiKeyAuth": []
}
],
"description": "render post content",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Upload"
],
"summary": "render post content",
"parameters": [
{
"description": "PostRenderReq",
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/schema.PostRenderReq"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/handler.RespBody"
}
}
}
}
},
"/answer/api/v1/question": {
"put": {
"security": [
@ -6589,6 +6628,14 @@ const docTemplate = `{
}
}
},
"schema.PostRenderReq": {
"type": "object",
"properties": {
"content": {
"type": "string"
}
}
},
"schema.QuestionAdd": {
"type": "object",
"required": [

View File

@ -2899,6 +2899,45 @@
}
}
},
"/answer/api/v1/post/render": {
"post": {
"security": [
{
"ApiKeyAuth": []
}
],
"description": "render post content",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Upload"
],
"summary": "render post content",
"parameters": [
{
"description": "PostRenderReq",
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/schema.PostRenderReq"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/handler.RespBody"
}
}
}
}
},
"/answer/api/v1/question": {
"put": {
"security": [
@ -6577,6 +6616,14 @@
}
}
},
"schema.PostRenderReq": {
"type": "object",
"properties": {
"content": {
"type": "string"
}
}
},
"schema.QuestionAdd": {
"type": "object",
"required": [

View File

@ -976,6 +976,11 @@ definitions:
type:
type: string
type: object
schema.PostRenderReq:
properties:
content:
type: string
type: object
schema.QuestionAdd:
properties:
content:
@ -3684,6 +3689,30 @@ paths:
summary: user's votes
tags:
- Activity
/answer/api/v1/post/render:
post:
consumes:
- application/json
description: render post content
parameters:
- description: PostRenderReq
in: body
name: data
required: true
schema:
$ref: '#/definitions/schema.PostRenderReq'
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/handler.RespBody'
security:
- ApiKeyAuth: []
summary: render post content
tags:
- Upload
/answer/api/v1/question:
delete:
consumes:

View File

@ -33,7 +33,7 @@ var (
"`user_id`",
"`vote_count`",
"`answer_count`",
"0 as `accepted`",
"CASE WHEN `accepted_answer_id` >0 THEN 2 ELSE 0 END as `accepted`",
"`question`.`status` as `status`",
"`post_update_time`",
}