findById method
Returns a user by id or throws NotFoundException.
Implementation
Future<User> findById(String id) async {
final user = await _repo.findById(id);
if (user == null) throw NotFoundException('User $id not found');
return user;
}
Returns a user by id or throws NotFoundException.
Future<User> findById(String id) async {
final user = await _repo.findById(id);
if (user == null) throw NotFoundException('User $id not found');
return user;
}