aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/http/DeviceServlet.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/traccar/http/DeviceServlet.java')
-rw-r--r--src/org/traccar/http/DeviceServlet.java6
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);
}
}