From c71e55ecc4c2381785b5f8ae10af74d8a537d6c3 Mon Sep 17 00:00:00 2001 From: Tobi Smethurst <31960611+tsmethurst@users.noreply.github.com> Date: Wed, 7 Jul 2021 15:46:42 +0200 Subject: clean up some weirdness in the router (#80) --- internal/cliactions/server/server.go | 3 ++- internal/cliactions/testrig/testrig.go | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'internal/cliactions') diff --git a/internal/cliactions/server/server.go b/internal/cliactions/server/server.go index 4864dacb4..dfe05f47a 100644 --- a/internal/cliactions/server/server.go +++ b/internal/cliactions/server/server.go @@ -67,6 +67,7 @@ var models []interface{} = []interface{}{ >smodel.Emoji{}, >smodel.Instance{}, >smodel.Notification{}, + >smodel.RouterSession{}, &oauth.Token{}, &oauth.Client{}, } @@ -94,7 +95,7 @@ var Start cliactions.GTSAction = func(ctx context.Context, c *config.Config, log federatingDB := federatingdb.New(dbService, c, log) - router, err := router.New(c, log) + router, err := router.New(c, dbService, log) if err != nil { return fmt.Errorf("error creating router: %s", err) } diff --git a/internal/cliactions/testrig/testrig.go b/internal/cliactions/testrig/testrig.go index a1d2d7af7..43d2db726 100644 --- a/internal/cliactions/testrig/testrig.go +++ b/internal/cliactions/testrig/testrig.go @@ -44,7 +44,7 @@ var Start cliactions.GTSAction = func(ctx context.Context, _ *config.Config, log c := testrig.NewTestConfig() dbService := testrig.NewTestDB() testrig.StandardDBSetup(dbService) - router := testrig.NewTestRouter() + router := testrig.NewTestRouter(dbService) storageBackend := testrig.NewTestStorage() testrig.StandardStorageSetup(storageBackend, "./testrig/media") -- cgit v1.3