Merge branch 'feat/1.0.7/short-id' into test

This commit is contained in:
aichy126 2023-03-09 16:06:52 +08:00
commit f52869ddd8
2 changed files with 4 additions and 0 deletions

View File

@ -297,6 +297,8 @@ func (s *SiteInfoService) SaveSeo(ctx context.Context, req schema.SiteSeoReq) (e
}
if req.PermaLink == schema.PermaLinkQuestionIDAndTitleByShortID || req.PermaLink == schema.PermaLinkQuestionIDByShortID {
uid.ShortIDSwitch = true
} else {
uid.ShortIDSwitch = false
}
return
}

View File

@ -33,6 +33,8 @@ func NewSiteInfoCommonService(siteInfoRepo SiteInfoRepo) *SiteInfoCommonService
}
if seoinfo.PermaLink == schema.PermaLinkQuestionIDAndTitleByShortID || seoinfo.PermaLink == schema.PermaLinkQuestionIDByShortID {
uid.ShortIDSwitch = true
} else {
uid.ShortIDSwitch = false
}
return siteInfo