forked from mtusi2026/mtusi2026lab6
lab6
This commit is contained in:
@@ -23,7 +23,7 @@ func (r *SessionRepository) Credentials(ctx context.Context, username string) (d
|
||||
row, err := r.store.queries.GetUserByUsername(ctx, username)
|
||||
if err != nil {
|
||||
if errors.Is(err, pgx.ErrNoRows) {
|
||||
return domain.UserCredentials{}, fmt.Errorf("%w: username %q", domain.ErrUnauthenticated, username)
|
||||
return domain.UserCredentials{}, fmt.Errorf("%w", domain.ErrUnauthenticated)
|
||||
}
|
||||
|
||||
return domain.UserCredentials{}, fmt.Errorf("load credentials: %w", mapError(err))
|
||||
|
||||
Reference in New Issue
Block a user