refactor(siteinfo): remove site url var
This commit is contained in:
@@ -7,7 +7,3 @@ const (
|
||||
AvatarTypeGravatar = "gravatar"
|
||||
AvatarTypeCustom = "custom"
|
||||
)
|
||||
|
||||
var (
|
||||
DefaultSiteURL = ""
|
||||
)
|
||||
|
||||
@@ -126,11 +126,7 @@ func (s *SiteInfoService) SaveSiteGeneral(ctx context.Context, req schema.SiteGe
|
||||
Content: string(content),
|
||||
Status: 1,
|
||||
}
|
||||
err = s.siteInfoRepo.SaveByType(ctx, constant.SiteTypeGeneral, data)
|
||||
if err == nil {
|
||||
constant.DefaultSiteURL = req.SiteUrl
|
||||
}
|
||||
return
|
||||
return s.siteInfoRepo.SaveByType(ctx, constant.SiteTypeGeneral, data)
|
||||
}
|
||||
|
||||
func (s *SiteInfoService) SaveSiteInterface(ctx context.Context, req schema.SiteInterfaceReq) (err error) {
|
||||
|
||||
Reference in New Issue
Block a user