From f837ea6346ac720d586eda51ab89c5c71a1f3e65 Mon Sep 17 00:00:00 2001 From: Joe Chen Date: Sat, 11 Jun 2022 09:42:17 +0800 Subject: db: use `context` and go-mockgen for `UsersStore` (#7042) --- internal/context/auth.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'internal/context/auth.go') diff --git a/internal/context/auth.go b/internal/context/auth.go index 25625c3d..cba68706 100644 --- a/internal/context/auth.go +++ b/internal/context/auth.go @@ -208,7 +208,7 @@ func authenticatedUser(ctx *macaron.Context, sess session.Store) (_ *db.User, is if len(auths) == 2 && auths[0] == "Basic" { uname, passwd, _ := tool.BasicAuthDecode(auths[1]) - u, err := db.Users.Authenticate(uname, passwd, -1) + u, err := db.Users.Authenticate(ctx.Req.Context(), uname, passwd, -1) if err != nil { if !auth.IsErrBadCredentials(err) { log.Error("Failed to authenticate user: %v", err) -- cgit v1.2.3