Update member services to include delete method
This commit is contained in:
@@ -49,6 +49,7 @@ function contentTypeResource($q, $http, umbRequestHelper) {
|
||||
'Failed to retrieve data for content id ' + contentId);
|
||||
},
|
||||
|
||||
|
||||
/**
|
||||
* @ngdoc method
|
||||
* @name umbraco.resources.contentTypeResource#getAllPropertyTypeAliases
|
||||
@@ -99,7 +100,18 @@ function contentTypeResource($q, $http, umbRequestHelper) {
|
||||
"contentTypeApiBaseUrl",
|
||||
"DeleteById",
|
||||
[{ id: id }])),
|
||||
'Failed to retrieve content type');
|
||||
'Failed to delete content type');
|
||||
},
|
||||
|
||||
deleteContainerById: function (id) {
|
||||
|
||||
return umbRequestHelper.resourcePromise(
|
||||
$http.post(
|
||||
umbRequestHelper.getApiUrl(
|
||||
"contentTypeApiBaseUrl",
|
||||
"DeleteContainerById",
|
||||
[{ id: id }])),
|
||||
'Failed to delete content type contaier');
|
||||
},
|
||||
|
||||
/**
|
||||
|
||||
@@ -27,7 +27,7 @@ function memberTypeResource($q, $http, umbRequestHelper) {
|
||||
[{ id: id }])),
|
||||
'Failed to retrieve property type scaffold');
|
||||
},
|
||||
|
||||
|
||||
getById: function (id) {
|
||||
|
||||
return umbRequestHelper.resourcePromise(
|
||||
@@ -39,6 +39,17 @@ function memberTypeResource($q, $http, umbRequestHelper) {
|
||||
'Failed to retrieve content type');
|
||||
},
|
||||
|
||||
deleteById: function (id) {
|
||||
|
||||
return umbRequestHelper.resourcePromise(
|
||||
$http.post(
|
||||
umbRequestHelper.getApiUrl(
|
||||
"memberTypeApiBaseUrl",
|
||||
"DeleteById",
|
||||
[{ id: id }])),
|
||||
'Failed to delete member type');
|
||||
},
|
||||
|
||||
getScaffold: function () {
|
||||
|
||||
return umbRequestHelper.resourcePromise(
|
||||
@@ -55,14 +66,14 @@ function memberTypeResource($q, $http, umbRequestHelper) {
|
||||
* @methodOf umbraco.resources.contentTypeResource
|
||||
*
|
||||
* @description
|
||||
* Saves or update a member type
|
||||
*
|
||||
* Saves or update a member type
|
||||
*
|
||||
* @param {Object} content data type object to create/update
|
||||
* @returns {Promise} resourcePromise object.
|
||||
*
|
||||
*/
|
||||
save: function (contentType) {
|
||||
|
||||
|
||||
return umbRequestHelper.resourcePromise(
|
||||
$http.post(umbRequestHelper.getApiUrl("memberTypeApiBaseUrl", "PostSave"), contentType),
|
||||
'Failed to save data for member type id ' + contentType.id);
|
||||
|
||||
Reference in New Issue
Block a user