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
aichy1266ece061e3757
diff --git a/internal/base/server/install.go b/internal/base/server/install.goindex f2d28bbe..db1bcc62 100644--- a/internal/base/server/install.go+++ b/internal/base/server/install.go@@ -37,5 +37,23 @@ func NewInstallHTTPServer() *gin.Engine {fs: ui.Build,}))+ installApi := r.Group("")+ installApi.GET("/install", Install)+return r}++func Install(c *gin.Context) {+ filePath := ""+ var file []byte+ var err error+ filePath = "build/index.html"+ c.Header("content-type", "text/html;charset=utf-8")+ file, err = ui.Build.ReadFile(filePath)+ if err != nil {+ log.Error(err)+ c.Status(http.StatusNotFound)+ return+ }+ c.String(http.StatusOK, string(file))+}