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(manifest): update manifest.json version
LinkinStar0ae6ddaa6751
diff --git a/internal/controller/siteinfo_controller.go b/internal/controller/siteinfo_controller.goindex 6337b133..fadeb190 100644--- a/internal/controller/siteinfo_controller.go+++ b/internal/controller/siteinfo_controller.go@@ -3,6 +3,7 @@ package controllerimport ("net/http"+ "github.com/answerdev/answer/internal/base/constant""github.com/answerdev/answer/internal/base/handler""github.com/answerdev/answer/internal/schema""github.com/answerdev/answer/internal/service/siteinfo_common"@@ -78,13 +79,17 @@ func (sc *SiteinfoController) GetSiteLegalInfo(ctx *gin.Context) {// GetManifestJson get manifest.jsonfunc (sc *SiteinfoController) GetManifestJson(ctx *gin.Context) {+ favicon := "favicon.ico"resp := &schema.GetManifestJsonResp{- ShortName: "Answer",- Name: "Answer.dev",+ ManifestVersion: 3,+ Version: constant.Version,+ ShortName: "Answer",+ Name: "Answer.dev",Icons: map[string]string{- "src": "favicon.ico",- "sizes": "64x64 32x32 24x24 16x16",- "type": "image/x-icon",+ "16": favicon,+ "32": favicon,+ "48": favicon,+ "128": favicon,},StartUrl: ".",Display: "standalone",@@ -95,7 +100,10 @@ func (sc *SiteinfoController) GetManifestJson(ctx *gin.Context) {if err != nil {log.Error(err)} else if len(branding.Favicon) > 0 {- resp.Icons["scr"] = branding.Favicon+ resp.Icons["16"] = branding.Favicon+ resp.Icons["32"] = branding.Favicon+ resp.Icons["48"] = branding.Favicon+ resp.Icons["128"] = branding.Favicon}ctx.JSON(http.StatusOK, resp)}diff --git a/internal/schema/siteinfo_schema.go b/internal/schema/siteinfo_schema.goindex 97ad7744..d83d7195 100644--- a/internal/schema/siteinfo_schema.go+++ b/internal/schema/siteinfo_schema.go@@ -143,6 +143,8 @@ type GetSMTPConfigResp struct {// GetManifestJsonResp get manifest json responsetype GetManifestJsonResp struct {+ ManifestVersion int `json:"manifest_version"`+ Version string `json:"version"`ShortName string `json:"short_name"`Name string `json:"name"`Icons map[string]string `json:"icons"`