simplify exporter creation

This commit is contained in:
Umputun
2017-12-24 18:33:51 -06:00
parent bda663f0d1
commit 74b67ae2d6
3 changed files with 2 additions and 6 deletions
-1
View File
@@ -72,7 +72,6 @@ func main() {
SessionStore: sessionStore,
Admins: opts.Admins,
DevMode: opts.DevMode,
Exporter: &migrator.Remark{DataStore: dataStore},
AuthGoogle: auth.NewGoogle(auth.Params{
Cid: opts.ServerCommand.GoogleCID,
Csecret: opts.ServerCommand.GoogleCSEC,
+1 -2
View File
@@ -4,11 +4,10 @@ import (
"log"
"net/http"
"github.com/umputun/remark/app/migrator"
"github.com/go-chi/chi"
"github.com/go-chi/render"
"github.com/umputun/remark/app/migrator"
"github.com/umputun/remark/app/store"
)
+1 -3
View File
@@ -29,7 +29,6 @@ type Server struct {
AuthGoogle *auth.Provider
AuthGithub *auth.Provider
SessionStore *sessions.FilesystemStore
Exporter migrator.Exporter
DevMode bool
mod admin
@@ -62,9 +61,8 @@ func (s *Server) Run() {
})
rapi.With(Auth(s.SessionStore, s.Admins, s.DevMode)).Group(func(radmin chi.Router) {
s.mod = admin{dataStore: s.Store, exporter: s.Exporter}
s.mod = admin{dataStore: s.Store, exporter: &migrator.Remark{DataStore: s.Store}}
radmin.Mount("/admin", s.mod.routes())
})
})