Skip to content

Commit

Permalink
fix: fix CI
Browse files Browse the repository at this point in the history
  • Loading branch information
MikkyBoy357 committed Aug 3, 2024
1 parent 4333ee1 commit 587e635
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 19 deletions.
20 changes: 10 additions & 10 deletions lib/data/request_handlers/chat.dart
Original file line number Diff line number Diff line change
Expand Up @@ -176,19 +176,19 @@ class ChatRequestHandlerImpl implements ChatRequestHandler {

downloadUrl = urlOrError.url;
uploadError = urlOrError.error;

if (uploadError != null) {
return Response.json(
body: {
'message': 'Failed to upload image',
'error': uploadError,
},
statusCode: 500,
);
}
}
}

if (downloadUrl == null) {
return Response.json(
body: {
'message': 'Failed to upload image',
'error': uploadError,
},
statusCode: 500,
);
}

final chat = await _chatRepository.getChatById(chatId: chatId);

if (chat == null) {
Expand Down
18 changes: 9 additions & 9 deletions lib/data/request_handlers/profile.dart
Original file line number Diff line number Diff line change
Expand Up @@ -44,16 +44,16 @@ class ProfileRequestHandlerImpl implements ProfileRequestHandler {

downloadUrl = urlOrError.url;
uploadError = urlOrError.error;
}

if (uploadError != null) {
return Response.json(
body: {
'message': 'Failed to upload avatar',
'error': uploadError,
},
statusCode: 500,
);
}
if (downloadUrl == null) {
return Response.json(
body: {
'message': 'Failed to upload avatar',
'error': uploadError,
},
statusCode: 500,
);
}

// Update user avatarUrl
Expand Down

0 comments on commit 587e635

Please sign in to comment.