diff --git a/guacamole/src/main/java/org/glyptodon/guacamole/net/basic/rest/user/UserRESTService.java b/guacamole/src/main/java/org/glyptodon/guacamole/net/basic/rest/user/UserRESTService.java index 5927b1b35..5321b925e 100644 --- a/guacamole/src/main/java/org/glyptodon/guacamole/net/basic/rest/user/UserRESTService.java +++ b/guacamole/src/main/java/org/glyptodon/guacamole/net/basic/rest/user/UserRESTService.java @@ -63,7 +63,7 @@ import org.slf4j.LoggerFactory; * * @author James Muehlner */ -@Path("/user") +@Path("/users") @Produces(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_JSON) public class UserRESTService { diff --git a/guacamole/src/main/webapp/app/rest/services/permissionService.js b/guacamole/src/main/webapp/app/rest/services/permissionService.js index f71b8cbca..3bcb1fb0f 100644 --- a/guacamole/src/main/webapp/app/rest/services/permissionService.js +++ b/guacamole/src/main/webapp/app/rest/services/permissionService.js @@ -50,7 +50,7 @@ angular.module('rest').factory('permissionService', ['$http', 'authenticationSer // Retrieve user permissions return $http({ method : 'GET', - url : 'api/user/' + encodeURIComponent(userID) + '/permissions', + url : 'api/users/' + encodeURIComponent(userID) + '/permissions', params : httpParameters }); @@ -198,7 +198,7 @@ angular.module('rest').factory('permissionService', ['$http', 'authenticationSer // Patch user permissions return $http({ method : 'PATCH', - url : 'api/user/' + encodeURIComponent(userID) + '/permissions', + url : 'api/users/' + encodeURIComponent(userID) + '/permissions', params : httpParameters, data : permissionPatch }); diff --git a/guacamole/src/main/webapp/app/rest/services/userService.js b/guacamole/src/main/webapp/app/rest/services/userService.js index 72b70458c..ad2837e7b 100644 --- a/guacamole/src/main/webapp/app/rest/services/userService.js +++ b/guacamole/src/main/webapp/app/rest/services/userService.js @@ -56,7 +56,7 @@ angular.module('rest').factory('userService', ['$http', 'authenticationService', // Retrieve users return $http({ method : 'GET', - url : 'api/user', + url : 'api/users', params : httpParameters }); @@ -73,7 +73,7 @@ angular.module('rest').factory('userService', ['$http', 'authenticationService', * A promise which will resolve with a @link{User} upon success. */ service.getUser = function getUser(userID) { - return $http.get("api/user/" + userID + "/?token=" + authenticationService.getCurrentToken()); + return $http.get("api/users/" + userID + "/?token=" + authenticationService.getCurrentToken()); }; /** @@ -88,7 +88,7 @@ angular.module('rest').factory('userService', ['$http', 'authenticationService', */ service.deleteUser = function deleteUser(user) { return $http['delete']( - "api/user/" + user.username + + "api/users/" + user.username + "?token=" + authenticationService.getCurrentToken()); }; @@ -105,7 +105,7 @@ angular.module('rest').factory('userService', ['$http', 'authenticationService', */ service.createUser = function createUser(user) { return $http.post( - "api/user/" + "api/users/" + "?token=" + authenticationService.getCurrentToken(), user ); @@ -123,7 +123,7 @@ angular.module('rest').factory('userService', ['$http', 'authenticationService', */ service.saveUser = function saveUser(user) { return $http.post( - "api/user/" + user.username + + "api/users/" + user.username + "?token=" + authenticationService.getCurrentToken(), user); };