refactor(siteinfo): remove site url var

This commit is contained in:
LinkinStars 2023-06-02 12:16:22 +08:00
parent 27aa4aa8cd
commit 0744658d7a
2 changed files with 1 additions and 9 deletions

View File

@ -7,7 +7,3 @@ const (
AvatarTypeGravatar = "gravatar" AvatarTypeGravatar = "gravatar"
AvatarTypeCustom = "custom" AvatarTypeCustom = "custom"
) )
var (
DefaultSiteURL = ""
)

View File

@ -126,11 +126,7 @@ func (s *SiteInfoService) SaveSiteGeneral(ctx context.Context, req schema.SiteGe
Content: string(content), Content: string(content),
Status: 1, Status: 1,
} }
err = s.siteInfoRepo.SaveByType(ctx, constant.SiteTypeGeneral, data) return s.siteInfoRepo.SaveByType(ctx, constant.SiteTypeGeneral, data)
if err == nil {
constant.DefaultSiteURL = req.SiteUrl
}
return
} }
func (s *SiteInfoService) SaveSiteInterface(ctx context.Context, req schema.SiteInterfaceReq) (err error) { func (s *SiteInfoService) SaveSiteInterface(ctx context.Context, req schema.SiteInterfaceReq) (err error) {