mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-06 21:27:40 +00:00
GUAC-932: Change user service path to /api/users.
This commit is contained in:
@@ -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 {
|
||||
|
@@ -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
|
||||
});
|
||||
|
@@ -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);
|
||||
};
|
||||
|
Reference in New Issue
Block a user