aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/reports/Route.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/traccar/reports/Route.java')
-rw-r--r--src/org/traccar/reports/Route.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/org/traccar/reports/Route.java b/src/org/traccar/reports/Route.java
index a77e3c5ff..7abe5c194 100644
--- a/src/org/traccar/reports/Route.java
+++ b/src/org/traccar/reports/Route.java
@@ -20,7 +20,7 @@ public final class Route {
public static String getJson(long userId, Collection<Long> deviceIds, Collection<Long> groupIds,
Date from, Date to) throws SQLException {
JsonObjectBuilder json = Json.createObjectBuilder();
- for (long deviceId: ReportUtils.getReportedDevices(deviceIds, groupIds)) {
+ for (long deviceId: ReportUtils.getDeviceList(deviceIds, groupIds)) {
Context.getPermissionsManager().checkDevice(userId, deviceId);
json.add(String.valueOf(deviceId), JsonConverter.arrayToJson(Context.getDataManager()
.getPositions(deviceId, from, to)));
@@ -32,10 +32,10 @@ public final class Route {
Date from, Date to) throws SQLException {
CsvBuilder csv = new CsvBuilder();
csv.addHeaderLine(new Position());
- for (long deviceId: ReportUtils.getReportedDevices(deviceIds, groupIds)) {
+ for (long deviceId: ReportUtils.getDeviceList(deviceIds, groupIds)) {
Context.getPermissionsManager().checkDevice(userId, deviceId);
csv.addArray(Context.getDataManager().getPositions(deviceId, from, to));
}
- return csv.get();
+ return csv.build();
}
}