Skip to content

Commit

Permalink
fix: removed "cyclic redundancy" issue causing "http" references
Browse files Browse the repository at this point in the history
  • Loading branch information
Imran committed Nov 16, 2020
1 parent 9a0f875 commit 65a6186
Showing 1 changed file with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
function backOfficeContentBlockerResources($http, umbRequestHelper) {

//const urlBase = Umbraco.Sys.ServerVariables.workflow.apiBasePath + '/groups';
const apiRoot = '/umbraco/backoffice/ContentBlocker/BackOfficeContentBlockerApi/';
var apiRoot = '/umbraco/backoffice/ContentBlocker/BackOfficeContentBlockerApi/';

const request = (method, url, data) =>
var request = (method, url, data) =>
umbRequestHelper.resourcePromise(
method === 'DELETE' ? $http.delete(url)
: method === 'POST' ? $http.post(url, data)
Expand All @@ -15,7 +15,7 @@
'Something broke'
);

const service = {
var service = {
isPageBlocked: () => request('GET', apiRoot + 'IsPageBlocked'),
lockPage: () => request('GET', apiRoot + 'LockPage'),
removeLock: () => request('GET', apiRoot + 'RemoveLock')
Expand All @@ -24,8 +24,7 @@
return service;
}


angular.module('umbraco.services')
.factory('BackOfficeContentBlocker.EditorManager.Resources', ['$http', 'umbRequestHelper', backOfficeContentBlockerResources]);
.factory('BackOfficeContentBlocker.EditorManager.Resources');

})();

0 comments on commit 65a6186

Please sign in to comment.