-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFilterInteractor.swift
More file actions
36 lines (27 loc) · 892 Bytes
/
Copy pathFilterInteractor.swift
File metadata and controls
36 lines (27 loc) · 892 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
//
// FilterInteractor.swift
// Stats
//
// Created by Leonid Kibukevich on 21.09.2021.
//
import Foundation
import Macaroni
protocol FilterInteractorInput {
func loadFilters(completion: @escaping ((Result<FiltersResponse, StatsAppError>) -> Void))
}
protocol FilterInteractorOutput {
}
class FilterInteractor: FilterInteractorInput {
@Injected
private var filterService: FilterService
private var filterType: FilterType
private var presenter: FilterInteractorOutput?
init(presenter: FilterInteractorOutput, filterType: FilterType) {
self.filterType = filterType
self.presenter = presenter
}
// MARK: - FilterInteractorInput
func loadFilters(completion: @escaping ((Result<FiltersResponse, StatsAppError>) -> Void)) {
filterService.loadFilters(filterType: filterType, completion: completion)
}
}