Skip to content

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.

update install api

aichy1260306ee01edd1
diff --git a/internal/base/server/install.go b/internal/base/server/install.go
index db1bcc62..da5652cc 100644
--- a/internal/base/server/install.go
+++ b/internal/base/server/install.go
@@ -6,6 +6,7 @@ import (
"io/fs"
"net/http"
+ "github.com/answerdev/answer/internal/base/handler"
"github.com/answerdev/answer/ui"
"github.com/gin-gonic/gin"
"github.com/segmentfault/pacman/log"
@@ -40,6 +41,22 @@ func NewInstallHTTPServer() *gin.Engine {
installApi := r.Group("")
installApi.GET("/install", Install)
+ installApi.POST("/installation/db/check", func(c *gin.Context) {
+ handler.HandleResponse(c, nil, gin.H{})
+ })
+
+ installApi.POST("/installation/config-file/check", func(c *gin.Context) {
+ handler.HandleResponse(c, nil, gin.H{})
+ })
+
+ installApi.POST("/installation/init", func(c *gin.Context) {
+ handler.HandleResponse(c, nil, gin.H{})
+ })
+
+ installApi.POST("/installation/base-info", func(c *gin.Context) {
+ handler.HandleResponse(c, nil, gin.H{})
+ })
+
return r
}
diff --git a/internal/router/ui.go b/internal/router/ui.go
index d74fbe6c..99bcaf07 100644
--- a/internal/router/ui.go
+++ b/internal/router/ui.go
@@ -92,33 +92,19 @@ func (a *UIRouter) Register(r *gin.Engine) {
c.String(http.StatusOK, string(file))
})
- // Install godoc
- // @Summary Install
- // @Description Install
- // @Tags Install
- // @Accept json
- // @Produce json
- // @Param data body schema.FollowReq true "follow"
- // @Success 200 {object} handler.RespBody{}
- // @Router /install/db/check [put]
- r.PUT("/install/db/check", func(c *gin.Context) {
+ r.POST("/installation/db/check", func(c *gin.Context) {
handler.HandleResponse(c, nil, gin.H{})
})
- // Install godoc
- // @Summary Install
- // @Description Install
- // @Tags Install
- // @Accept json
- // @Produce json
- // @Param data body schema.FollowReq true "follow"
- // @Success 200 {object} handler.RespBody{}
- // @Router /install [put]
- r.PUT("/install", func(c *gin.Context) {
+ r.POST("/installation/config-file/check", func(c *gin.Context) {
+ handler.HandleResponse(c, nil, gin.H{})
+ })
+
+ r.POST("/installation/init", func(c *gin.Context) {
handler.HandleResponse(c, nil, gin.H{})
})
- r.PUT("/install/siteconfig", func(c *gin.Context) {
+ r.POST("/installation/base-info", func(c *gin.Context) {
handler.HandleResponse(c, nil, gin.H{})
})