pass dataservice to importer/exporter
This commit is contained in:
+3
-3
@@ -82,7 +82,7 @@ func main() {
|
||||
return sess
|
||||
}()
|
||||
|
||||
exporter := migrator.Remark{CommentFinder: dataStore}
|
||||
exporter := migrator.Remark{CommentFinder: &dataService}
|
||||
cache := rest.NewLoadingCache(4*time.Hour, 15*time.Minute, postFlushFn)
|
||||
|
||||
activateBackup(&exporter)
|
||||
@@ -90,8 +90,8 @@ func main() {
|
||||
importSrv := api.Import{
|
||||
Version: revision,
|
||||
Cache: cache,
|
||||
NativeImporter: &migrator.Remark{CommentCreator: dataStore},
|
||||
DisqusImporter: &migrator.Disqus{CommentCreator: dataStore},
|
||||
NativeImporter: &migrator.Remark{CommentCreator: &dataService},
|
||||
DisqusImporter: &migrator.Disqus{CommentCreator: &dataService},
|
||||
}
|
||||
go importSrv.Run(opts.Port + 1)
|
||||
|
||||
|
||||
@@ -136,11 +136,6 @@ func (a *admin) alterComments(comments []store.Comment, r *http.Request) (res []
|
||||
c.Deleted = true
|
||||
}
|
||||
|
||||
// set default avatar
|
||||
if c.User.Picture == "" {
|
||||
c.User.Picture = a.defAvatarURL
|
||||
}
|
||||
|
||||
// hide info from non-admins
|
||||
if !isAdmin {
|
||||
c.User.IP = ""
|
||||
|
||||
Reference in New Issue
Block a user