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:
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user