visitor password

This commit is contained in:
mohammad
2024-08-13 17:08:18 +03:00
parent 350888c9da
commit 2d0f85bded
15 changed files with 920 additions and 282 deletions

View File

@ -50,8 +50,7 @@ class AuthenticationAPI {
}
);
return 30;
} on DioError catch (e) {
} on DioException catch (e) {
if (e.response != null) {
if (e.response!.statusCode == 400) {
// Handle 400 Bad Request
@ -64,7 +63,6 @@ class AuthenticationAPI {
int cooldown = errorData['data']['cooldown'] ?? 1;
return cooldown;
}
} else {
debugPrint('Error: ${e.response!.statusCode} - ${e.response!.statusMessage}');
return 1;
@ -73,7 +71,6 @@ class AuthenticationAPI {
debugPrint('Error: ${e.message}');
return 1;
}
return 1;
} catch (e) {
debugPrint('Unexpected Error: $e');
return 1;