dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #24239
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 11842: allow both /profile and /user-account to be used on /api/currentUser
------------------------------------------------------------
revno: 11842
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2013-08-30 11:41:48 +0200
message:
allow both /profile and /user-account to be used on /api/currentUser
modified:
dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/user/CurrentUserController.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/api/controller/user/CurrentUserController.java'
--- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/user/CurrentUserController.java 2013-08-23 16:00:30 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/user/CurrentUserController.java 2013-08-30 09:41:48 +0000
@@ -166,7 +166,7 @@
JacksonUtils.toJson( response.getOutputStream(), dashboard );
}
- @RequestMapping( value = "/user-account", produces = { "application/json", "text/*" } )
+ @RequestMapping( value = { "/profile", "/user-account" }, produces = { "application/json", "text/*" } )
public void getUserAccount( HttpServletResponse response ) throws Exception
{
User currentUser = currentUserService.getCurrentUser();
@@ -203,7 +203,7 @@
JacksonUtils.toJson( response.getOutputStream(), userAccount );
}
- @RequestMapping( value = "/user-account", method = RequestMethod.POST, consumes = "application/json" )
+ @RequestMapping( value = { "/profile", "/user-account" }, method = RequestMethod.POST, consumes = "application/json" )
public void postUserAccountJson( HttpServletResponse response, HttpServletRequest request ) throws Exception
{
UserAccount userAccount = JacksonUtils.fromJson( request.getInputStream(), UserAccount.class );