diff options
author | Iván Ávalos <avalos@disroot.org> | 2022-01-16 18:28:14 -0600 |
---|---|---|
committer | Iván Ávalos <avalos@disroot.org> | 2022-01-16 18:28:14 -0600 |
commit | f133dc96d4072c3bf4f9794b000b1e0ab946f96b (patch) | |
tree | b4210a6abeed10b1bf6c8486462495d46e4a9566 /shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/controllers/ReportController.kt | |
parent | 21e16e27f047053582d8b0c722feedf3c8badebe (diff) | |
download | etbsa-trackermap-mobile-f133dc96d4072c3bf4f9794b000b1e0ab946f96b.tar.gz etbsa-trackermap-mobile-f133dc96d4072c3bf4f9794b000b1e0ab946f96b.tar.bz2 etbsa-trackermap-mobile-f133dc96d4072c3bf4f9794b000b1e0ab946f96b.zip |
Fixed event report types on API
Diffstat (limited to 'shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/controllers/ReportController.kt')
-rw-r--r-- | shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/controllers/ReportController.kt | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/controllers/ReportController.kt b/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/controllers/ReportController.kt index 8a7f527..78f0173 100644 --- a/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/controllers/ReportController.kt +++ b/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/controllers/ReportController.kt @@ -37,7 +37,7 @@ class ReportController( reportType: ReportType?, reportPeriod: ReportDates.ReportPeriod?, xlsx: Boolean = false, - eventTypes: Array<EventInformation.Type> = arrayOf() + eventTypes: List<EventInformation.Type> = listOf() ) { if (reportType == null || reportPeriod == null) { return @@ -85,7 +85,7 @@ class ReportController( deviceId: Int, from: String, to: String, - types: Array<EventInformation.Type>, + types: List<EventInformation.Type>, xlsx: Boolean ) { Log.d("UnitReportsVM", "Fetching events") @@ -93,7 +93,7 @@ class ReportController( if (!xlsx) { val positionsResult = reportsApi.reportsRouteGet(from, to, deviceId) val eventsResult = reportsApi.reportsEventsGet( - from, to, EventInformation.reportTypesToString(types), deviceId + from, to, EventInformation.reportTypesToStrings(types), deviceId ) val geofencesResult = geofencesApi.geofencesGet(all = true) @@ -110,7 +110,7 @@ class ReportController( reportFlow.value = Report.EventsReport(result.toTypedArray()) } else { val result = reportsApi.reportsEventsGetXlsx( - from, to, EventInformation.reportTypesToString(types), deviceId + from, to, EventInformation.reportTypesToStrings(types), deviceId ) Log.d("UnitReportsVM", "Events report: $result") |