sqlx: optimize initial logic for data service

r/paopao-ce-plus paopao-ce-plus/v0.5.0-alpha.1
Michael Li 1 year ago
parent f293c573c3
commit 283770104b
No known key found for this signature in database

@ -50,11 +50,9 @@ type webDataSrvA struct {
func NewDataService() (core.DataService, core.VersionInfo) {
lazyInitial()
pvs := security.NewPhoneVerifyService()
tms := NewTweetMetricServentA(_db)
cis := cache.NewEventCacheIndexSrv(tms)
ds := &dataSrv{
TweetMetricServantA: tms,
WalletService: newWalletService(_db),
@ -71,7 +69,7 @@ func NewDataService() (core.DataService, core.VersionInfo) {
SecurityService: newSecurityService(_db, pvs),
AttachmentCheckService: security.NewAttachmentCheckService(),
}
return ds, ds
return cache.NewCacheDataService(ds), ds
}
func NewWebDataServantA() (core.WebDataServantA, core.VersionInfo) {

Loading…
Cancel
Save