Skip to content

Commit

Permalink
fix: bio char limit
Browse files Browse the repository at this point in the history
  • Loading branch information
MikkyBoy357 committed Aug 3, 2024
1 parent c167ce3 commit 1130e41
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions lib/data/request_handlers/profile.dart
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,13 @@ class ProfileRequestHandlerImpl implements ProfileRequestHandler {
required User user,
required String bio,
}) async {
if (bio.length > 69) {
return Response.json(
body: 'Error: Bio cannot be more than 69 characters.',
statusCode: 400,
);
}

final updatedUser = await _profileRepository.changeProfileBio(
user: user,
bio: bio,
Expand Down

0 comments on commit 1130e41

Please sign in to comment.