mirror of https://gitee.com/answerdev/answer.git
refactor(siteinfo): remove site url var
This commit is contained in:
parent
27aa4aa8cd
commit
0744658d7a
|
@ -7,7 +7,3 @@ const (
|
||||||
AvatarTypeGravatar = "gravatar"
|
AvatarTypeGravatar = "gravatar"
|
||||||
AvatarTypeCustom = "custom"
|
AvatarTypeCustom = "custom"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
|
||||||
DefaultSiteURL = ""
|
|
||||||
)
|
|
||||||
|
|
|
@ -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) {
|
||||||
|
|
Loading…
Reference in New Issue