summaryrefslogtreecommitdiffstats
path: root/cmd
diff options
context:
space:
mode:
authorJakobDev <jakobdev@gmx.de>2023-09-15 08:13:19 +0200
committerGitHub <noreply@github.com>2023-09-15 06:13:19 +0000
commitc548dde205244a39a26ba98377c0f5cc11da7041 (patch)
treef9d9e1185609703e320ed07fd2ff3f95dbdcc230 /cmd
parentf8a109440655b77e8554e1744e31bf52a7c63df7 (diff)
downloadgitea-c548dde205244a39a26ba98377c0f5cc11da7041.tar.gz
gitea-c548dde205244a39a26ba98377c0f5cc11da7041.zip
More refactoring of `db.DefaultContext` (#27083)
Next step of #27065
Diffstat (limited to 'cmd')
-rw-r--r--cmd/admin_user_create.go2
-rw-r--r--cmd/admin_user_generate_access_token.go4
2 files changed, 3 insertions, 3 deletions
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
}