mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-07 21:51:23 +00:00
GUACAMOLE-5: Expose session as a REST resource. Refactor /api/data to /api/session/data.
This commit is contained in:
@@ -56,7 +56,7 @@ angular.module('rest').factory('connectionService', ['$injector',
|
||||
return $http({
|
||||
cache : cacheService.connections,
|
||||
method : 'GET',
|
||||
url : 'api/data/' + encodeURIComponent(dataSource) + '/connections/' + encodeURIComponent(id),
|
||||
url : 'api/session/data/' + encodeURIComponent(dataSource) + '/connections/' + encodeURIComponent(id),
|
||||
params : httpParameters
|
||||
});
|
||||
|
||||
@@ -84,7 +84,7 @@ angular.module('rest').factory('connectionService', ['$injector',
|
||||
// Retrieve connection history
|
||||
return $http({
|
||||
method : 'GET',
|
||||
url : 'api/data/' + encodeURIComponent(dataSource) + '/connections/' + encodeURIComponent(id) + '/history',
|
||||
url : 'api/session/data/' + encodeURIComponent(dataSource) + '/connections/' + encodeURIComponent(id) + '/history',
|
||||
params : httpParameters
|
||||
});
|
||||
|
||||
@@ -113,7 +113,7 @@ angular.module('rest').factory('connectionService', ['$injector',
|
||||
return $http({
|
||||
cache : cacheService.connections,
|
||||
method : 'GET',
|
||||
url : 'api/data/' + encodeURIComponent(dataSource) + '/connections/' + encodeURIComponent(id) + '/parameters',
|
||||
url : 'api/session/data/' + encodeURIComponent(dataSource) + '/connections/' + encodeURIComponent(id) + '/parameters',
|
||||
params : httpParameters
|
||||
});
|
||||
|
||||
@@ -143,7 +143,7 @@ angular.module('rest').factory('connectionService', ['$injector',
|
||||
if (!connection.identifier) {
|
||||
return $http({
|
||||
method : 'POST',
|
||||
url : 'api/data/' + encodeURIComponent(dataSource) + '/connections',
|
||||
url : 'api/session/data/' + encodeURIComponent(dataSource) + '/connections',
|
||||
params : httpParameters,
|
||||
data : connection
|
||||
})
|
||||
@@ -159,7 +159,7 @@ angular.module('rest').factory('connectionService', ['$injector',
|
||||
else {
|
||||
return $http({
|
||||
method : 'PUT',
|
||||
url : 'api/data/' + encodeURIComponent(dataSource) + '/connections/' + encodeURIComponent(connection.identifier),
|
||||
url : 'api/session/data/' + encodeURIComponent(dataSource) + '/connections/' + encodeURIComponent(connection.identifier),
|
||||
params : httpParameters,
|
||||
data : connection
|
||||
})
|
||||
@@ -192,7 +192,7 @@ angular.module('rest').factory('connectionService', ['$injector',
|
||||
// Delete connection
|
||||
return $http({
|
||||
method : 'DELETE',
|
||||
url : 'api/data/' + encodeURIComponent(dataSource) + '/connections/' + encodeURIComponent(connection.identifier),
|
||||
url : 'api/session/data/' + encodeURIComponent(dataSource) + '/connections/' + encodeURIComponent(connection.identifier),
|
||||
params : httpParameters
|
||||
})
|
||||
|
||||
|
Reference in New Issue
Block a user