refactor: Provide context to user repository
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
package auth
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"git.ostiwe.com/ostiwe-com/status/modules/jwt"
|
||||
"git.ostiwe.com/ostiwe-com/status/repository"
|
||||
"golang.org/x/crypto/bcrypt"
|
||||
@@ -16,8 +18,8 @@ func New() Module {
|
||||
}
|
||||
}
|
||||
|
||||
func (m *Module) Proceed(login, password string) (*string, error) {
|
||||
lightweightUser, err := m.userRepository.FindByLogin(login)
|
||||
func (m *Module) Proceed(ctx context.Context, login, password string) (*string, error) {
|
||||
lightweightUser, err := m.userRepository.FindByLogin(ctx, login)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user