Fixed error add bookmarks

This commit is contained in:
Juan Gilsanz Polo
2024-04-06 14:59:11 +02:00
parent 01e05098d0
commit a90f47cd5c
2 changed files with 5 additions and 2 deletions

View File

@@ -171,7 +171,10 @@ class ApiClientService {
"/bookmarks/",
data: FormData.fromMap(bookmark.toJson()),
);
if (response.statusCode != 200) {
if (response.statusCode == null) {
return const ApiResponse(successful: false);
}
if (response.statusCode! >= 400) {
return const ApiResponse(successful: false);
}
return ApiResponse(