File tree Expand file tree Collapse file tree 2 files changed +26
-0
lines changed
Projects/Domain/Sources/UseCases/Notifications Expand file tree Collapse file tree 2 files changed +26
-0
lines changed Original file line number Diff line number Diff line change 1+ import RxSwift
2+
3+ public struct FetchNotificationListUseCase {
4+ private let notificationsRepository : any NotificationsRepository
5+
6+ public init ( notificationsRepository: any NotificationsRepository ) {
7+ self . notificationsRepository = notificationsRepository
8+ }
9+
10+ public func execute( ) -> Single < [ NotificationEntity ] > {
11+ notificationsRepository. fetchNotificationsList ( )
12+ }
13+ }
Original file line number Diff line number Diff line change 1+ import RxSwift
2+
3+ public struct ReadNotificationUseCase {
4+ private let notificationsRepository : any NotificationsRepository
5+
6+ public init ( notificationsRepository: any NotificationsRepository ) {
7+ self . notificationsRepository = notificationsRepository
8+ }
9+
10+ public func execute( id: Int ) -> Completable {
11+ notificationsRepository. patchReadNotification ( id: id)
12+ }
13+ }
You canโt perform that action at this time.
0 commit comments