Update the usage of GetUrl - to just use the raw string value as opposed to a JSON object. Updated related JS object mock as well

This commit is contained in:
Warren Buckley
2017-01-18 12:34:58 +00:00
parent fc5bf81991
commit 40ea54007f
2 changed files with 4 additions and 7 deletions

View File

@@ -38,12 +38,8 @@ angular.module('umbraco.mocks').
if (!mocksUtils.checkAuth()) {
return [401, null, null];
}
var urlOrbject = {
"url": "url"
};
return [200, urlOrbject, null];
return [200, "url", null];
}
@@ -61,7 +57,7 @@ angular.module('umbraco.mocks').
$httpBackend
.whenGET(mocksUtils.urlRegex('/umbraco/UmbracoApi/Entity/GetById?'))
.respond(returnEntitybyId);
$httpBackend
.whenGET(mocksUtils.urlRegex('/umbraco/UmbracoApi/Entity/GetUrl?'))
.respond(returnEntityUrl);

View File

@@ -254,7 +254,8 @@ function contentPickerController($scope, entityResource, editorState, iconHelper
if(entityType !== "Member") {
entityResource.getUrl(entity.id, entityType).then(function(data){
// update url
entity.url = data.url;
entity.url = data;
// push item to render model
addSelectedItem(entity);
});