From 4920229a3b6e1d7dde536bc9ff766542b05d935c Mon Sep 17 00:00:00 2001 From: tobi <31960611+tsmethurst@users.noreply.github.com> Date: Fri, 20 Aug 2021 12:26:56 +0200 Subject: Database updates (#144) * start moving some database stuff around * continue moving db stuff around * more fiddling * more updates * and some more * and yet more * i broke SOMETHING but what, it's a mystery * tidy up * vendor ttlcache * use ttlcache * fix up some tests * rename some stuff * little reminder * some more updates --- internal/transport/controller.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'internal/transport/controller.go') diff --git a/internal/transport/controller.go b/internal/transport/controller.go index 33eab2a3a..4eb6b5658 100644 --- a/internal/transport/controller.go +++ b/internal/transport/controller.go @@ -28,7 +28,6 @@ import ( "github.com/sirupsen/logrus" "github.com/superseriousbusiness/gotosocial/internal/config" "github.com/superseriousbusiness/gotosocial/internal/db" - "github.com/superseriousbusiness/gotosocial/internal/gtsmodel" ) // Controller generates transports for use in making federation requests to other servers. @@ -95,14 +94,15 @@ func (c *controller) NewTransportForUsername(username string) (Transport, error) // We need an account to use to create a transport for dereferecing something. // If a username has been given, we can fetch the account with that username and use it. // Otherwise, we can take the instance account and use those credentials to make the request. - ourAccount := >smodel.Account{} var u string if username == "" { u = c.config.Host } else { u = username } - if err := c.db.GetLocalAccountByUsername(u, ourAccount); err != nil { + + ourAccount, err := c.db.GetLocalAccountByUsername(u) + if err != nil { return nil, fmt.Errorf("error getting account %s from db: %s", username, err) } -- cgit v1.2.3