forked from eatvio/eatvio_app
25 lines
641 B
Dart
25 lines
641 B
Dart
import 'dart:developer';
|
|
import 'package:eatvio_app/features/notifications/service/notifications_service.dart';
|
|
|
|
class NotificationsRepository {
|
|
final NotificationsService notificationsService;
|
|
NotificationsRepository({required this.notificationsService});
|
|
|
|
Future<Map<String, dynamic>?> getNotifications({required int page}) {
|
|
try {
|
|
return notificationsService.getNotifications(page: page);
|
|
} catch (e) {
|
|
log(e.toString());
|
|
rethrow;
|
|
}
|
|
}
|
|
|
|
Future<void> markNotificationsAsRead() async {
|
|
try {
|
|
await notificationsService.markNotificationsAsRead();
|
|
} catch (e) {
|
|
rethrow;
|
|
}
|
|
}
|
|
}
|