dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #41165
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 20967: SynchronizationController
------------------------------------------------------------
revno: 20967
committer: Mark Polak <markpo@xxxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2015-11-05 23:31:39 +0100
message:
SynchronizationController
Make /sychronization/metadataPull accept the url as the requestbody
instead of the requestparam as sending urls as request params
causes trouble when parsing.
modified:
dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/SynchronizationController.java
--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk
Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/SynchronizationController.java'
--- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/SynchronizationController.java 2015-10-20 03:59:54 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/SynchronizationController.java 2015-11-05 22:31:39 +0000
@@ -36,9 +36,9 @@
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
-import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.client.RestTemplate;
@@ -78,7 +78,7 @@
@PreAuthorize( "hasRole('ALL')" )
@RequestMapping( value = "/metadataPull", method = RequestMethod.POST )
- public void importMetaData( @RequestParam String url, HttpServletResponse response )
+ public void importMetaData( @RequestBody String url, HttpServletResponse response )
throws IOException
{
org.hisp.dhis.dxf2.metadata.ImportSummary summary = synchronizationManager.executeMetadataPull( url );