simplify exporter creation
This commit is contained in:
@@ -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
@@ -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
@@ -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())
|
||||
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user