diff options
author | 2024-05-29 12:56:17 +0200 | |
---|---|---|
committer | 2024-05-29 12:56:17 +0200 | |
commit | f9a4a6120db69e5ead542cb130533b0c20e2cd66 (patch) | |
tree | f2b465c2e79fb63908e8bb7c642f089b0e653020 /internal/api/client.go | |
parent | [chore/bugfix] Don't cache MovedTo account (#2939) (diff) | |
download | gotosocial-f9a4a6120db69e5ead542cb130533b0c20e2cd66.tar.xz |
[feature] Debug admin endpoint to clear caches (#2940)
* [feature] Debug admin endpoint to clear caches
* go fmt
Diffstat (limited to 'internal/api/client.go')
-rw-r--r-- | internal/api/client.go | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/internal/api/client.go b/internal/api/client.go index d30f82e7b..ce95e3dfc 100644 --- a/internal/api/client.go +++ b/internal/api/client.go @@ -50,6 +50,7 @@ import ( "github.com/superseriousbusiness/gotosocial/internal/middleware" "github.com/superseriousbusiness/gotosocial/internal/processing" "github.com/superseriousbusiness/gotosocial/internal/router" + "github.com/superseriousbusiness/gotosocial/internal/state" ) type Client struct { @@ -127,13 +128,13 @@ func (c *Client) Route(r *router.Router, m ...gin.HandlerFunc) { c.user.Route(h) } -func NewClient(db db.DB, p *processing.Processor) *Client { +func NewClient(state *state.State, p *processing.Processor) *Client { return &Client{ processor: p, - db: db, + db: state.DB, accounts: accounts.New(p), - admin: admin.New(p), + admin: admin.New(state, p), apps: apps.New(p), blocks: blocks.New(p), bookmarks: bookmarks.New(p), |