fixed warnings

This commit is contained in:
llsajjad
2025-08-11 13:30:53 +03:30
parent 3e2d7333df
commit 79ea6f7b83
5 changed files with 95 additions and 67 deletions
+6 -7
View File
@@ -13,12 +13,11 @@ class AuthRepository {
try {
final response = await _authService.login(email, password);
final user = UserModel(token: response['token'], name: response['name']);
return Result.ok(user); // در حالت موفقیت، یک Ok برمی‌گرداند
} catch (e) {
// در حالت خطا، یک Error برمی‌گرداند
return Result.error(
AuthenticationException('Email or password is not correct.'),
);
}
return Result.ok(user);
} on Exception {
return Result.error(
AuthenticationException('Email or password is not correct.'),
);
}
}
}