changeset 169:1613ab50d6d0

LProbeService uses LProbeInfo objects to deserialize JSON and extracts a LProbe object.
author Raimund Renkert <rrenkert@intevation.de>
date Mon, 24 Jun 2013 14:02:47 +0200
parents 3fd87a66c60c
children 18b234ef3733
files src/main/java/de/intevation/lada/rest/LProbeService.java
diffstat 1 files changed, 4 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/main/java/de/intevation/lada/rest/LProbeService.java	Mon Jun 24 13:52:46 2013 +0200
+++ b/src/main/java/de/intevation/lada/rest/LProbeService.java	Mon Jun 24 14:02:47 2013 +0200
@@ -88,14 +88,15 @@
     @Path("/{id}")
     @Produces("text/json")
     @Consumes("application/json")
-    public Response update(LProbe probe) {
+    public Response update(LProbeInfo probe) {
         return repository.update(probe);
     }
 
     @POST
     @Produces("text/json")
     @Consumes("application/json")
-    public Response create(LProbe probe) {
-        return repository.create(probe);
+    public Response create(LProbeInfo probe) {
+        LProbe p = probe.toLProbe();
+        return repository.create(p);
     }
 }
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)