fix: update login functionality to use username instead of email

This commit is contained in:
Nils-Johan Gynther
2026-04-21 22:17:09 +02:00
parent b87c877b38
commit eceb94c604
3 changed files with 10 additions and 11 deletions
@@ -20,10 +20,10 @@ class AuthNotifier extends AsyncNotifier<String?> {
return ref.watch(authRepositoryProvider).getToken();
}
Future<void> login(String email, String password) async {
Future<void> login(String username, String password) async {
state = const AsyncLoading();
state = await AsyncValue.guard(
() => ref.read(authRepositoryProvider).login(email, password),
() => ref.read(authRepositoryProvider).login(username, password),
);
}