removed try-catch blocks from auth_api.dart, devices_api.dart and spaces_api.dart files

This commit is contained in:
Mohammad Salameh
2024-04-16 15:45:04 +03:00
parent df13c66b1a
commit 95f7ade9e6
3 changed files with 58 additions and 82 deletions

View File

@ -16,16 +16,11 @@ class AuthenticationAPI {
static Future<Token> loginWithEmail(
{required LoginWithEmailModel model}) async {
try {
final response = await HTTPService().post(
path: ApiEndpoints.login,
body: model.toJson(),
showServerMessage: false,
expectedResponseModel: (json) => Token.fromJson(json['data']));
// developer.log("response: $response");
return response;
} catch (e) {
rethrow;
}
final response = await HTTPService().post(
path: ApiEndpoints.login,
body: model.toJson(),
showServerMessage: false,
expectedResponseModel: (json) => Token.fromJson(json['data']));
return response;
}
}