diff --git a/cmd/async/main.go b/cmd/async/main.go index 895ca3c..e68efe8 100644 --- a/cmd/async/main.go +++ b/cmd/async/main.go @@ -17,7 +17,7 @@ import ( "git.grassecon.net/grassrootseconomics/sarafu-vise/config" "git.grassecon.net/grassrootseconomics/visedriver/storage" "git.grassecon.net/grassrootseconomics/visedriver/request" - httpremote "git.grassecon.net/grassrootseconomics/sarafu-api/remote/http" + "git.grassecon.net/grassrootseconomics/sarafu-vise/services" "git.grassecon.net/grassrootseconomics/sarafu-vise/args" "git.grassecon.net/grassrootseconomics/sarafu-vise/handlers" ) @@ -125,7 +125,8 @@ func main() { lhs, err := handlers.NewLocalHandlerService(ctx, pfp, true, dbResource, cfg, rs) lhs.SetDataStore(&userdataStore) - accountService := &httpremote.HTTPAccountService{} + + accountService := services.New(ctx, menuStorageService, connData) hl, err := lhs.GetHandler(accountService) if err != nil { diff --git a/cmd/http/main.go b/cmd/http/main.go index 3e3e37e..10f0874 100644 --- a/cmd/http/main.go +++ b/cmd/http/main.go @@ -21,7 +21,7 @@ import ( "git.grassecon.net/grassrootseconomics/visedriver/request" "git.grassecon.net/grassrootseconomics/visedriver/storage" - httpremote "git.grassecon.net/grassrootseconomics/sarafu-api/remote/http" + "git.grassecon.net/grassrootseconomics/sarafu-vise/services" "git.grassecon.net/grassrootseconomics/sarafu-vise/args" "git.grassecon.net/grassrootseconomics/sarafu-vise/handlers" ) @@ -116,7 +116,8 @@ func main() { os.Exit(1) } - accountService := &httpremote.HTTPAccountService{} + accountService := services.New(ctx, menuStorageService, connData) + hl, err := lhs.GetHandler(accountService) if err != nil { fmt.Fprintf(os.Stderr, err.Error()) @@ -130,6 +131,8 @@ func main() { } defer stateStore.Close() + //accountService := services.New(ctx, menuStorageService, connData) + rp := &httprequest.DefaultRequestParser{} bsh := request.NewBaseRequestHandler(cfg, rs, stateStore, userdataStore, rp, hl) sh := httprequest.NewHTTPRequestHandler(bsh) diff --git a/ssh/ssh.go b/ssh/ssh.go index 34cb91d..18e930d 100644 --- a/ssh/ssh.go +++ b/ssh/ssh.go @@ -17,7 +17,7 @@ import ( "git.defalsify.org/vise.git/resource" "git.defalsify.org/vise.git/state" "git.grassecon.net/grassrootseconomics/visedriver/storage" - httpremote "git.grassecon.net/grassrootseconomics/sarafu-api/remote/http" + "git.grassecon.net/grassrootseconomics/sarafu-vise/services" "git.grassecon.net/grassrootseconomics/sarafu-vise/handlers" ) @@ -180,7 +180,8 @@ func(s *SshRunner) GetEngine(sessionId string) (engine.Engine, func(), error) { } // TODO: clear up why pointer here and by-value other cmds - accountService := &httpremote.HTTPAccountService{} + accountService := services.New(ctx, menuStorageService, s.Conn) + hl, err := lhs.GetHandler(accountService) if err != nil { return nil, nil, err