summaryrefslogtreecommitdiffstats
path: root/services/externalaccount/link.go
diff options
context:
space:
mode:
authorJakobDev <jakobdev@gmx.de>2023-09-25 15:17:37 +0200
committerGitHub <noreply@github.com>2023-09-25 13:17:37 +0000
commit7047df36d4c39fefa6464b713c66302aa0038123 (patch)
treea5c471a3e8abf5cabac8de42c0fd8a814df7abf1 /services/externalaccount/link.go
parent93bd4351bfb4a2f5f37ecb80d50496d044240e00 (diff)
downloadgitea-7047df36d4c39fefa6464b713c66302aa0038123.tar.gz
gitea-7047df36d4c39fefa6464b713c66302aa0038123.zip
Another round of `db.DefaultContext` refactor (#27103)
Part of #27065 --------- Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
Diffstat (limited to 'services/externalaccount/link.go')
-rw-r--r--services/externalaccount/link.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/services/externalaccount/link.go b/services/externalaccount/link.go
index a19d4c5ab3..d6e2ea7e94 100644
--- a/services/externalaccount/link.go
+++ b/services/externalaccount/link.go
@@ -4,6 +4,7 @@
package externalaccount
import (
+ "context"
"fmt"
user_model "code.gitea.io/gitea/models/user"
@@ -19,11 +20,11 @@ type Store interface {
}
// LinkAccountFromStore links the provided user with a stored external user
-func LinkAccountFromStore(store Store, user *user_model.User) error {
+func LinkAccountFromStore(ctx context.Context, store Store, user *user_model.User) error {
gothUser := store.Get("linkAccountGothUser")
if gothUser == nil {
return fmt.Errorf("not in LinkAccount session")
}
- return LinkAccountToUser(user, gothUser.(goth.User))
+ return LinkAccountToUser(ctx, user, gothUser.(goth.User))
}