diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2016-12-10 10:57:01 +1300 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2016-12-10 10:57:01 +1300 |
commit | 33d6d288d07fdd24fa8a6307d3eff8d371f5932a (patch) | |
tree | 3f1b59269c012f559c05037263fc43134499f17b /src/org/traccar/api/resource/PositionResource.java | |
parent | 2263d424eb10a1ac56818ecea575723a3d380705 (diff) | |
download | trackermap-server-33d6d288d07fdd24fa8a6307d3eff8d371f5932a.tar.gz trackermap-server-33d6d288d07fdd24fa8a6307d3eff8d371f5932a.tar.bz2 trackermap-server-33d6d288d07fdd24fa8a6307d3eff8d371f5932a.zip |
Return JSON response by default
Diffstat (limited to 'src/org/traccar/api/resource/PositionResource.java')
-rw-r--r-- | src/org/traccar/api/resource/PositionResource.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/org/traccar/api/resource/PositionResource.java b/src/org/traccar/api/resource/PositionResource.java index 84f406bee..9d3cd9ae6 100644 --- a/src/org/traccar/api/resource/PositionResource.java +++ b/src/org/traccar/api/resource/PositionResource.java @@ -37,6 +37,7 @@ import java.util.Collection; import java.util.List; @Path("positions") +@Produces(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_JSON) public class PositionResource extends BaseResource { @@ -46,7 +47,6 @@ public class PositionResource extends BaseResource { public static final String CONTENT_DISPOSITION_VALUE_GPX = "attachment; filename=positions.gpx"; @GET - @Produces(MediaType.APPLICATION_JSON) public Collection<Position> getJson( @QueryParam("deviceId") long deviceId, @QueryParam("id") List<Long> positionIds, @QueryParam("from") String from, @QueryParam("to") String to) @@ -92,4 +92,5 @@ public class PositionResource extends BaseResource { deviceId, DateUtil.parseDate(from), DateUtil.parseDate(to))); return Response.ok(gpx.build()).header(HttpHeaders.CONTENT_DISPOSITION, CONTENT_DISPOSITION_VALUE_GPX).build(); } + } |