From cac2ce03d6cd7e398de6aab9b6828d26dfeebe42 Mon Sep 17 00:00:00 2001 From: aichy126 <16996097+aichy126@users.noreply.github.com> Date: Thu, 9 Mar 2023 16:06:31 +0800 Subject: [PATCH] update short id switch --- internal/service/siteinfo/siteinfo_service.go | 2 ++ internal/service/siteinfo_common/siteinfo_service.go | 2 ++ 2 files changed, 4 insertions(+) diff --git a/internal/service/siteinfo/siteinfo_service.go b/internal/service/siteinfo/siteinfo_service.go index e7ff9360..4d3eaebc 100644 --- a/internal/service/siteinfo/siteinfo_service.go +++ b/internal/service/siteinfo/siteinfo_service.go @@ -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 } diff --git a/internal/service/siteinfo_common/siteinfo_service.go b/internal/service/siteinfo_common/siteinfo_service.go index d690e5fd..b2a89643 100644 --- a/internal/service/siteinfo_common/siteinfo_service.go +++ b/internal/service/siteinfo_common/siteinfo_service.go @@ -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