Skip to content

Conversation

@marcelomendoncasoares
Copy link
Collaborator

Missing piece that was questioned on Discord.

@marcelomendoncasoares marcelomendoncasoares requested a review from a team January 20, 2026 12:58
Comment on lines +125 to +136
```dart
class UserProfileEditEndpoint extends UserProfileEditBaseEndpoint {
Future<UserProfileModel> updateBio(Session session, String bio) async {
final userId = session.authenticated!.authUserId;
// Your custom logic to update the bio
// ...
return userProfiles.findUserProfileByUserId(session, userId);
}
}
```
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This code sample is a bit confusing since we don't have a bio field on user profile. Why not we show overriding an existing method and adding validation on it? Eg. overriding changeUserName and we can show enforcing a min of 3 chars

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My idea here was to show adding an endpoint instead of overriding, to show how to extend the functionality. Maybe adding a comment describing the hypothetical scenario of existing related bio info would make it clearer?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants