← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 19688: [mobile] fix for server detect correct client version

 

------------------------------------------------------------
revno: 19688
committer: Long Ngo Thanh <thanhlongngo1988@xxxxxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2015-07-27 11:09:19 +0700
message:
  [mobile] fix for server detect correct client version
modified:
  dhis-2/dhis-web/dhis-web-api-mobile/src/main/java/org/hisp/dhis/api/mobile/controller/MobileClientController.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-mobile/src/main/java/org/hisp/dhis/api/mobile/controller/MobileClientController.java'
--- dhis-2/dhis-web/dhis-web-api-mobile/src/main/java/org/hisp/dhis/api/mobile/controller/MobileClientController.java	2015-01-28 10:50:56 +0000
+++ dhis-2/dhis-web/dhis-web-api-mobile/src/main/java/org/hisp/dhis/api/mobile/controller/MobileClientController.java	2015-07-27 04:09:19 +0000
@@ -81,7 +81,7 @@
         return orgUnits;
     }
 
-    @RequestMapping( method = RequestMethod.GET, value = "/{version}" )
+    @RequestMapping( method = RequestMethod.GET, value = "/{version:.+}" )
     @ResponseBody
     public OrgUnits getOrgUnitsForUser( HttpServletRequest request, @PathVariable
     String version )
@@ -102,7 +102,7 @@
             unitList.add( getOrgUnit( unit, request ) );
         }
         OrgUnits orgUnits = new OrgUnits( unitList );
-        orgUnits.setClientVersion( DataStreamSerializable.TWO_POINT_NINE );
+        orgUnits.setClientVersion( version );
         return orgUnits;
     }