mirror of https://gitee.com/answerdev/answer.git
feat(version): move AnswerVersion to site-info API
This commit is contained in:
parent
edc06942d5
commit
e9d5667708
2
Makefile
2
Makefile
|
@ -41,6 +41,6 @@ install-ui-packages:
|
|||
@corepack prepare pnpm@v7.12.2 --activate
|
||||
|
||||
ui:
|
||||
@cd ui && pnpm install && pnpm build && sed -i 's/%AnswerVersion%/'$(VERSION)'/g' ./build/index.html && cd -
|
||||
@cd ui && pnpm install && pnpm build && cd -
|
||||
|
||||
all: clean build
|
||||
|
|
|
@ -31,7 +31,7 @@ func NewSiteinfoController(siteInfoService *siteinfo_common.SiteInfoCommonServic
|
|||
// @Router /answer/api/v1/siteinfo [get]
|
||||
func (sc *SiteinfoController) GetSiteInfo(ctx *gin.Context) {
|
||||
var err error
|
||||
resp := &schema.SiteInfoResp{}
|
||||
resp := &schema.SiteInfoResp{Version: constant.Version}
|
||||
resp.General, err = sc.siteInfoService.GetSiteGeneral(ctx)
|
||||
if err != nil {
|
||||
log.Error(err)
|
||||
|
|
|
@ -166,6 +166,7 @@ type SiteInfoResp struct {
|
|||
Theme *SiteThemeResp `json:"theme"`
|
||||
CustomCssHtml *SiteCustomCssHTMLResp `json:"custom_css_html"`
|
||||
SiteSeo *SiteSeoReq `json:"site_seo"`
|
||||
Version string `json:"version"`
|
||||
}
|
||||
type TemplateSiteInfoResp struct {
|
||||
General *SiteGeneralResp `json:"general"`
|
||||
|
|
Loading…
Reference in New Issue