diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2015-05-10 18:11:40 +1200 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2015-05-10 18:11:40 +1200 |
commit | bd09a39f12c4471bdc342e5a16fbabdffdc645d1 (patch) | |
tree | db94476ee604c2026c5653975c526352093d5628 /src/org/traccar/http/DeviceServlet.java | |
parent | 953852e6e984f8a639cf1a5ac4116fff755d538a (diff) | |
download | trackermap-server-bd09a39f12c4471bdc342e5a16fbabdffdc645d1.tar.gz trackermap-server-bd09a39f12c4471bdc342e5a16fbabdffdc645d1.tar.bz2 trackermap-server-bd09a39f12c4471bdc342e5a16fbabdffdc645d1.zip |
Refactor web app architecture
Diffstat (limited to 'src/org/traccar/http/DeviceServlet.java')
-rw-r--r-- | src/org/traccar/http/DeviceServlet.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/org/traccar/http/DeviceServlet.java b/src/org/traccar/http/DeviceServlet.java index a06ea5368..1387c2a13 100644 --- a/src/org/traccar/http/DeviceServlet.java +++ b/src/org/traccar/http/DeviceServlet.java @@ -47,19 +47,19 @@ public class DeviceServlet extends BaseServlet { Device device = JsonConverter.objectFromJson(req.getReader(), new Device()); Context.getDataManager().addDevice(device); Context.getDataManager().linkDevice(getUserId(req.getSession()), device.getId()); - sendResponse(resp.getWriter()); + sendResponse(resp.getWriter(), JsonConverter.objectToJson(device)); } private void update(HttpServletRequest req, HttpServletResponse resp) throws Exception { Context.getDataManager().updateDevice(JsonConverter.objectFromJson( req.getReader(), new Device())); - sendResponse(resp.getWriter()); + sendResponse(resp.getWriter(), true); } private void remove(HttpServletRequest req, HttpServletResponse resp) throws Exception { Context.getDataManager().removeDevice(JsonConverter.objectFromJson( req.getReader(), new Device())); - sendResponse(resp.getWriter()); + sendResponse(resp.getWriter(), true); } } |