From c548dde205244a39a26ba98377c0f5cc11da7041 Mon Sep 17 00:00:00 2001 From: JakobDev Date: Fri, 15 Sep 2023 08:13:19 +0200 Subject: More refactoring of `db.DefaultContext` (#27083) Next step of #27065 --- cmd/admin_user_create.go | 2 +- cmd/admin_user_generate_access_token.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'cmd') diff --git a/cmd/admin_user_create.go b/cmd/admin_user_create.go index 73afcdcf32..fefe18d39c 100644 --- a/cmd/admin_user_create.go +++ b/cmd/admin_user_create.go @@ -156,7 +156,7 @@ func runCreateUser(c *cli.Context) error { UID: u.ID, } - if err := auth_model.NewAccessToken(t); err != nil { + if err := auth_model.NewAccessToken(ctx, t); err != nil { return err } diff --git a/cmd/admin_user_generate_access_token.go b/cmd/admin_user_generate_access_token.go index 0febb91661..6e78939680 100644 --- a/cmd/admin_user_generate_access_token.go +++ b/cmd/admin_user_generate_access_token.go @@ -63,7 +63,7 @@ func runGenerateAccessToken(c *cli.Context) error { UID: user.ID, } - exist, err := auth_model.AccessTokenByNameExists(t) + exist, err := auth_model.AccessTokenByNameExists(ctx, t) if err != nil { return err } @@ -79,7 +79,7 @@ func runGenerateAccessToken(c *cli.Context) error { t.Scope = accessTokenScope // create the token - if err := auth_model.NewAccessToken(t); err != nil { + if err := auth_model.NewAccessToken(ctx, t); err != nil { return err } -- cgit v1.2.3