diff options
Diffstat (limited to 'internal/processing/app.go')
-rw-r--r-- | internal/processing/app.go | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/internal/processing/app.go b/internal/processing/app.go index 7da5344ac..4f805572b 100644 --- a/internal/processing/app.go +++ b/internal/processing/app.go @@ -19,6 +19,8 @@ package processing import ( + "context" + "github.com/google/uuid" apimodel "github.com/superseriousbusiness/gotosocial/internal/api/model" "github.com/superseriousbusiness/gotosocial/internal/gtsmodel" @@ -26,7 +28,7 @@ import ( "github.com/superseriousbusiness/gotosocial/internal/oauth" ) -func (p *processor) AppCreate(authed *oauth.Auth, form *apimodel.ApplicationCreateRequest) (*apimodel.Application, error) { +func (p *processor) AppCreate(ctx context.Context, authed *oauth.Auth, form *apimodel.ApplicationCreateRequest) (*apimodel.Application, error) { // set default 'read' for scopes if it's not set, this follows the default of the mastodon api https://docs.joinmastodon.org/methods/apps/ var scopes string if form.Scopes == "" { @@ -61,7 +63,7 @@ func (p *processor) AppCreate(authed *oauth.Auth, form *apimodel.ApplicationCrea } // chuck it in the db - if err := p.db.Put(app); err != nil { + if err := p.db.Put(ctx, app); err != nil { return nil, err } @@ -74,11 +76,11 @@ func (p *processor) AppCreate(authed *oauth.Auth, form *apimodel.ApplicationCrea } // chuck it in the db - if err := p.db.Put(oc); err != nil { + if err := p.db.Put(ctx, oc); err != nil { return nil, err } - mastoApp, err := p.tc.AppToMastoSensitive(app) + mastoApp, err := p.tc.AppToMastoSensitive(ctx, app) if err != nil { return nil, err } |