diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2015-05-02 18:51:34 +1200 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2015-05-02 18:51:34 +1200 |
commit | af72af207613c80b8d66814d30644e4228e9b9e6 (patch) | |
tree | 56409810df0967976dce60799180fbee41e82439 /src/org/traccar/http | |
parent | 44da47950bdd75be57714158fd8a6d59c94460b5 (diff) | |
download | traccar-server-af72af207613c80b8d66814d30644e4228e9b9e6.tar.gz traccar-server-af72af207613c80b8d66814d30644e4228e9b9e6.tar.bz2 traccar-server-af72af207613c80b8d66814d30644e4228e9b9e6.zip |
Refactor data manager code
Diffstat (limited to 'src/org/traccar/http')
-rw-r--r-- | src/org/traccar/http/DeviceServlet.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/org/traccar/http/DeviceServlet.java b/src/org/traccar/http/DeviceServlet.java index 64f7836a4..98f00b320 100644 --- a/src/org/traccar/http/DeviceServlet.java +++ b/src/org/traccar/http/DeviceServlet.java @@ -27,6 +27,7 @@ import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.traccar.Context; +import org.traccar.database.ObjectConverter; import org.traccar.helper.Log; import org.traccar.model.Device; @@ -60,7 +61,8 @@ public class DeviceServlet extends HttpServlet { try { result.add("success", true); - result.add("data", Context.getDataManager().getDevices(userId)); + result.add("data", ObjectConverter.arrayToJson( + Context.getDataManager().getDevices(userId))); } catch(SQLException error) { result.add("success", false); result.add("error", error.getMessage()); |