diff --git a/docs/docs.go b/docs/docs.go index 47eb274e..ad4e2c58 100644 --- a/docs/docs.go +++ b/docs/docs.go @@ -3654,7 +3654,7 @@ const docTemplate = `{ } } }, - "/answer/api/v1/question/invite_user": { + "/answer/api/v1/question/invite": { "get": { "security": [ { @@ -3690,9 +3690,7 @@ const docTemplate = `{ } } } - } - }, - "/answer/api/v1/question/inviter_user": { + }, "put": { "security": [ { diff --git a/docs/swagger.json b/docs/swagger.json index a3c2e8e6..3312fc5e 100644 --- a/docs/swagger.json +++ b/docs/swagger.json @@ -3642,7 +3642,7 @@ } } }, - "/answer/api/v1/question/invite_user": { + "/answer/api/v1/question/invite": { "get": { "security": [ { @@ -3678,9 +3678,7 @@ } } } - } - }, - "/answer/api/v1/question/inviter_user": { + }, "put": { "security": [ { diff --git a/docs/swagger.yaml b/docs/swagger.yaml index 88f3e18a..8519dc50 100644 --- a/docs/swagger.yaml +++ b/docs/swagger.yaml @@ -4492,7 +4492,7 @@ paths: summary: get question details tags: - Question - /answer/api/v1/question/invite_user: + /answer/api/v1/question/invite: get: consumes: - application/json @@ -4516,7 +4516,6 @@ paths: summary: get question invite user info tags: - Question - /answer/api/v1/question/inviter_user: put: consumes: - application/json diff --git a/internal/controller/question_controller.go b/internal/controller/question_controller.go index 107c469f..9ab267ef 100644 --- a/internal/controller/question_controller.go +++ b/internal/controller/question_controller.go @@ -230,7 +230,7 @@ func (qc *QuestionController) GetQuestion(ctx *gin.Context) { // @Produce json // @Param id query string true "Question ID" default(1) // @Success 200 {string} string "" -// @Router /answer/api/v1/question/invite_user [get] +// @Router /answer/api/v1/question/invite [get] func (qc *QuestionController) GetQuestionInviteUserInfo(ctx *gin.Context) { id := ctx.Query("id") id = uid.DeShortID(id) @@ -547,7 +547,7 @@ func (qc *QuestionController) UpdateQuestion(ctx *gin.Context) { // @Security ApiKeyAuth // @Param data body schema.QuestionUpdateInviteUser true "question" // @Success 200 {object} handler.RespBody -// @Router /answer/api/v1/question/inviter_user [put] +// @Router /answer/api/v1/question/invite [put] func (qc *QuestionController) UpdateQuestionInviteUser(ctx *gin.Context) { req := &schema.QuestionUpdateInviteUser{} errFields := handler.BindAndCheckReturnErr(ctx, req) diff --git a/internal/router/answer_api_router.go b/internal/router/answer_api_router.go index 3f90218c..ccc46909 100644 --- a/internal/router/answer_api_router.go +++ b/internal/router/answer_api_router.go @@ -130,7 +130,7 @@ func (a *AnswerAPIRouter) RegisterUnAuthAnswerAPIRouter(r *gin.RouterGroup) { //question r.GET("/question/info", a.questionController.GetQuestion) - r.GET("/question/invite_user", a.questionController.GetQuestionInviteUserInfo) + r.GET("/question/invite", a.questionController.GetQuestionInviteUserInfo) r.GET("/question/page", a.questionController.QuestionPage) r.GET("/question/similar/tag", a.questionController.SimilarQuestion) r.GET("/personal/qa/top", a.questionController.UserTop) @@ -195,7 +195,7 @@ func (a *AnswerAPIRouter) RegisterAnswerAPIRouter(r *gin.RouterGroup) { r.POST("/question", a.questionController.AddQuestion) r.POST("/question/answer", a.questionController.AddQuestionByAnswer) r.PUT("/question", a.questionController.UpdateQuestion) - r.PUT("/question/inviter_user", a.questionController.UpdateQuestionInviteUser) + r.PUT("/question/invite", a.questionController.UpdateQuestionInviteUser) r.DELETE("/question", a.questionController.RemoveQuestion) r.PUT("/question/status", a.questionController.CloseQuestion) r.PUT("/question/operation", a.questionController.OperationQuestion)