fix
This commit is contained in:
@@ -7,7 +7,7 @@ class CancelRideUsecase {
|
||||
|
||||
CancelRideUsecase(this.repository);
|
||||
|
||||
Future<Result<ScooterOrder>> call(int orderId) {
|
||||
Future<Result<void>> call(int orderId) {
|
||||
return repository.cancelRide(orderId);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@ class FinishRideUsecase {
|
||||
|
||||
FinishRideUsecase(this.repository);
|
||||
|
||||
Future<Result<ScooterOrder>> call(int orderId, List<int> files) {
|
||||
Future<Result<void>> call(int orderId, List<int> files) {
|
||||
return repository.finishRide(orderId, files);
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,5 @@
|
||||
import '../entities/client_notification.dart';
|
||||
import '../entities/pagination_meta.dart';
|
||||
import '../repositories/notification_repository.dart';
|
||||
|
||||
class GetNotificationsUsecase {
|
||||
@@ -6,7 +7,17 @@ class GetNotificationsUsecase {
|
||||
|
||||
GetNotificationsUsecase(this.repository);
|
||||
|
||||
Future<List<ClientNotification>> call() {
|
||||
return repository.getNotifications();
|
||||
Future<NotificationsResult> call({int page = 1, int pageSize = 10}) {
|
||||
return repository.getNotifications(page: page, pageSize: pageSize);
|
||||
}
|
||||
}
|
||||
|
||||
class NotificationsResult {
|
||||
final List<ClientNotification> notifications;
|
||||
final PaginationMeta pagination;
|
||||
|
||||
NotificationsResult({
|
||||
required this.notifications,
|
||||
required this.pagination,
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user