mirror of https://gitee.com/answerdev/answer.git
Merge branch 'feat/0.7.0/seo' into feat/0.7.0/user-manage
This commit is contained in:
commit
a4ad6b7fad
|
@ -6944,6 +6944,9 @@ const docTemplate = `{
|
|||
"login": {
|
||||
"$ref": "#/definitions/schema.SiteLoginResp"
|
||||
},
|
||||
"siteseo": {
|
||||
"$ref": "#/definitions/schema.SiteSeoReq"
|
||||
},
|
||||
"theme": {
|
||||
"$ref": "#/definitions/schema.SiteThemeResp"
|
||||
}
|
||||
|
|
|
@ -6932,6 +6932,9 @@
|
|||
"login": {
|
||||
"$ref": "#/definitions/schema.SiteLoginResp"
|
||||
},
|
||||
"siteseo": {
|
||||
"$ref": "#/definitions/schema.SiteSeoReq"
|
||||
},
|
||||
"theme": {
|
||||
"$ref": "#/definitions/schema.SiteThemeResp"
|
||||
}
|
||||
|
|
|
@ -1292,6 +1292,8 @@ definitions:
|
|||
$ref: '#/definitions/schema.SiteInterfaceResp'
|
||||
login:
|
||||
$ref: '#/definitions/schema.SiteLoginResp'
|
||||
siteseo:
|
||||
$ref: '#/definitions/schema.SiteSeoReq'
|
||||
theme:
|
||||
$ref: '#/definitions/schema.SiteThemeResp'
|
||||
type: object
|
||||
|
|
|
@ -15,7 +15,6 @@ import (
|
|||
"github.com/answerdev/answer/pkg/converter"
|
||||
"github.com/gin-gonic/gin"
|
||||
"github.com/segmentfault/pacman/errors"
|
||||
"github.com/segmentfault/pacman/log"
|
||||
)
|
||||
|
||||
// QuestionController question controller
|
||||
|
@ -334,19 +333,6 @@ func (qc *QuestionController) UpdateQuestion(ctx *gin.Context) {
|
|||
return
|
||||
}
|
||||
|
||||
// TODO: pass errFields and return errors
|
||||
log.Info(errFields)
|
||||
|
||||
// errMsg := fmt.Sprintf(`The reserved tag "%s" must be present.`,
|
||||
// strings.Join(CheckOldTaglist, ","))
|
||||
// errorlist := make([]*validator.FormErrorField, 0)
|
||||
// errorlist = append(errorlist, &validator.FormErrorField{
|
||||
// ErrorField: "tags",
|
||||
// ErrorMsg: errMsg,
|
||||
// })
|
||||
// err = errors.BadRequest(reason.RequestFormatError).WithMsg(errMsg)
|
||||
// return errorlist, err
|
||||
|
||||
errlist, err := qc.questionService.UpdateQuestionCheckTags(ctx, req)
|
||||
if err != nil {
|
||||
for _, item := range errlist {
|
||||
|
|
|
@ -60,6 +60,11 @@ func (sc *SiteinfoController) GetSiteInfo(ctx *gin.Context) {
|
|||
if err != nil {
|
||||
log.Error(err)
|
||||
}
|
||||
resp.SiteSeo, err = sc.siteInfoService.GetSiteSeo(ctx)
|
||||
if err != nil {
|
||||
log.Error(err)
|
||||
}
|
||||
|
||||
handler.HandleResponse(ctx, nil, resp)
|
||||
}
|
||||
|
||||
|
|
|
@ -162,12 +162,13 @@ type SiteInfoResp struct {
|
|||
Login *SiteLoginResp `json:"login"`
|
||||
Theme *SiteThemeResp `json:"theme"`
|
||||
CustomCssHtml *SiteCustomCssHTMLResp `json:"custom_css_html"`
|
||||
SiteSeo *SiteSeoReq `json:"site_seo"`
|
||||
}
|
||||
type TemplateSiteInfoResp struct {
|
||||
General *SiteGeneralResp `json:"general"`
|
||||
Interface *SiteInterfaceResp `json:"interface"`
|
||||
Branding *SiteBrandingResp `json:"branding"`
|
||||
SiteSeo *SiteSeoReq `json:"siteseo"`
|
||||
SiteSeo *SiteSeoReq `json:"site_seo"`
|
||||
Title string
|
||||
Year string
|
||||
Canonical string
|
||||
|
|
Loading…
Reference in New Issue