update install api

This commit is contained in:
aichy126 2022-11-03 11:46:54 +08:00
parent 6f999a5a28
commit 0306ee01ed
2 changed files with 24 additions and 21 deletions

View File

@ -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
}

View File

@ -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.PUT("/install/siteconfig", func(c *gin.Context) {
r.POST("/installation/init", func(c *gin.Context) {
handler.HandleResponse(c, nil, gin.H{})
})
r.POST("/installation/base-info", func(c *gin.Context) {
handler.HandleResponse(c, nil, gin.H{})
})