forked from eatvio/eatvio_app
Merge remote-tracking branch 'upstream/main'
This commit is contained in:
16
lib/features/plans/repositories/plans_repository.dart
Normal file
16
lib/features/plans/repositories/plans_repository.dart
Normal file
@@ -0,0 +1,16 @@
|
||||
import 'package:eatvio_app/features/feed/models/plan_pagination_model.dart';
|
||||
import 'package:eatvio_app/features/plans/services/plans_service.dart';
|
||||
|
||||
class PlansRepository {
|
||||
final PlansService plansService;
|
||||
|
||||
PlansRepository({required this.plansService});
|
||||
|
||||
Future<List<PlanModel>> getPlansBySlug(String slug) async {
|
||||
try {
|
||||
return (await plansService.getPlansBySlug(author: slug)).data;
|
||||
} catch (e) {
|
||||
rethrow;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user