Skip to content

Commit

Permalink
update short id switch
Browse files Browse the repository at this point in the history
  • Loading branch information
aichy126 committed Mar 9, 2023
1 parent b224824 commit cac2ce0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions internal/service/siteinfo/siteinfo_service.go
Expand Up @@ -286,6 +286,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
}
2 changes: 2 additions & 0 deletions internal/service/siteinfo_common/siteinfo_service.go
Expand Up @@ -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
Expand Down

0 comments on commit cac2ce0

Please sign in to comment.