refactor: Provide context to user repository

This commit is contained in:
2025-08-20 11:17:39 +03:00
parent 32780303a3
commit 2a9dfcf998
4 changed files with 14 additions and 10 deletions

View File

@@ -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
}