mirror of https://gitee.com/answerdev/answer.git
update short id switch
This commit is contained in:
parent
b224824bbf
commit
cac2ce03d6
|
@ -286,6 +286,8 @@ func (s *SiteInfoService) SaveSeo(ctx context.Context, req schema.SiteSeoReq) (e
|
||||||
}
|
}
|
||||||
if req.PermaLink == schema.PermaLinkQuestionIDAndTitleByShortID || req.PermaLink == schema.PermaLinkQuestionIDByShortID {
|
if req.PermaLink == schema.PermaLinkQuestionIDAndTitleByShortID || req.PermaLink == schema.PermaLinkQuestionIDByShortID {
|
||||||
uid.ShortIDSwitch = true
|
uid.ShortIDSwitch = true
|
||||||
|
} else {
|
||||||
|
uid.ShortIDSwitch = false
|
||||||
}
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,6 +33,8 @@ func NewSiteInfoCommonService(siteInfoRepo SiteInfoRepo) *SiteInfoCommonService
|
||||||
}
|
}
|
||||||
if seoinfo.PermaLink == schema.PermaLinkQuestionIDAndTitleByShortID || seoinfo.PermaLink == schema.PermaLinkQuestionIDByShortID {
|
if seoinfo.PermaLink == schema.PermaLinkQuestionIDAndTitleByShortID || seoinfo.PermaLink == schema.PermaLinkQuestionIDByShortID {
|
||||||
uid.ShortIDSwitch = true
|
uid.ShortIDSwitch = true
|
||||||
|
} else {
|
||||||
|
uid.ShortIDSwitch = false
|
||||||
}
|
}
|
||||||
|
|
||||||
return siteInfo
|
return siteInfo
|
||||||
|
|
Loading…
Reference in New Issue