From f9a4a6120db69e5ead542cb130533b0c20e2cd66 Mon Sep 17 00:00:00 2001 From: tobi <31960611+tsmethurst@users.noreply.github.com> Date: Wed, 29 May 2024 12:56:17 +0200 Subject: [feature] Debug admin endpoint to clear caches (#2940) * [feature] Debug admin endpoint to clear caches * go fmt --- internal/api/client.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'internal/api/client.go') 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), -- cgit v1.2.3