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 router
aichy1269fb1d82a5b26
diff --git a/internal/controller/question_controller.go b/internal/controller/question_controller.goindex 7e708ba7..1ea03644 100644--- a/internal/controller/question_controller.go+++ b/internal/controller/question_controller.go@@ -234,7 +234,7 @@ func (qc *QuestionController) UpdateQuestion(ctx *gin.Context) {// @Security ApiKeyAuth// @Param id query string true "id" default(string)// @Success 200 {object} handler.RespBody-// @Router /answer/api/v1/question/edit/check [get]+// @Router /answer/api/v1/revisions/edit/check [get]func (qc *QuestionController) CheckCanUpdateQuestion(ctx *gin.Context) {req := &schema.CheckCanQuestionUpdate{}if handler.BindAndCheck(ctx, req) {diff --git a/internal/router/answer_api_router.go b/internal/router/answer_api_router.goindex 80525787..c45aa659 100644--- a/internal/router/answer_api_router.go+++ b/internal/router/answer_api_router.go@@ -147,6 +147,7 @@ func (a *AnswerAPIRouter) RegisterAnswerAPIRouter(r *gin.RouterGroup) {//revisionsr.GET("/revisions/unreviewed", a.revisionController.GetUnreviewedRevisionList)r.PUT("/revisions/audit", a.revisionController.RevisionAudit)+ r.GET("/revisions/edit/check", a.questionController.CheckCanUpdateQuestion)// commentr.POST("/comment", a.commentController.AddComment)@@ -177,7 +178,6 @@ func (a *AnswerAPIRouter) RegisterAnswerAPIRouter(r *gin.RouterGroup) {// questionr.POST("/question", a.questionController.AddQuestion)r.PUT("/question", a.questionController.UpdateQuestion)- r.GET("/question/edit/check", a.questionController.CheckCanUpdateQuestion)r.DELETE("/question", a.questionController.RemoveQuestion)r.PUT("/question/status", a.questionController.CloseQuestion)r.GET("/question/similar", a.questionController.SearchByTitleLike)