Merge pull request #2574 from umbraco/temp-U4-11195
fixes U4-11195 Mapping complex properties slow down some queries
This commit is contained in:
@@ -57,7 +57,7 @@ function contentResource($q, $http, umbDataFormatter, umbRequestHelper) {
|
||||
saveModel),
|
||||
'Failed to save permissions');
|
||||
},
|
||||
|
||||
|
||||
|
||||
getRecycleBin: function () {
|
||||
return umbRequestHelper.resourcePromise(
|
||||
@@ -424,7 +424,7 @@ function contentResource($q, $http, umbDataFormatter, umbRequestHelper) {
|
||||
$http.get(
|
||||
umbRequestHelper.getApiUrl(
|
||||
"contentApiBaseUrl",
|
||||
"GetEmpty",
|
||||
"GetEmpty",
|
||||
[{ blueprintId: blueprintId }, { parentId: parentId}])),
|
||||
'Failed to retrieve blueprint for id ' + blueprintId);
|
||||
},
|
||||
@@ -488,6 +488,7 @@ function contentResource($q, $http, umbDataFormatter, umbRequestHelper) {
|
||||
getChildren: function (parentId, options) {
|
||||
|
||||
var defaults = {
|
||||
includeProperties: [],
|
||||
pageSize: 0,
|
||||
pageNumber: 0,
|
||||
filter: '',
|
||||
@@ -531,6 +532,7 @@ function contentResource($q, $http, umbDataFormatter, umbRequestHelper) {
|
||||
"GetChildren",
|
||||
{
|
||||
id: parentId,
|
||||
includeProperties: _.pluck(options.includeProperties, 'alias').join(","),
|
||||
pageNumber: options.pageNumber,
|
||||
pageSize: options.pageSize,
|
||||
orderBy: options.orderBy,
|
||||
@@ -580,7 +582,7 @@ function contentResource($q, $http, umbDataFormatter, umbRequestHelper) {
|
||||
"contentApiBaseUrl",
|
||||
"GetDetailedPermissions", { contentId: contentId })),
|
||||
'Failed to retrieve permissions for content item ' + contentId);
|
||||
},
|
||||
},
|
||||
|
||||
getPermissions: function (nodeIds) {
|
||||
return umbRequestHelper.resourcePromise(
|
||||
@@ -741,11 +743,11 @@ function contentResource($q, $http, umbDataFormatter, umbRequestHelper) {
|
||||
|
||||
createBlueprintFromContent: function (contentId, name) {
|
||||
return umbRequestHelper.resourcePromise(
|
||||
$http.post(
|
||||
$http.post(
|
||||
umbRequestHelper.getApiUrl("contentApiBaseUrl", "CreateBlueprintFromContent", {
|
||||
contentId: contentId, name: name
|
||||
})
|
||||
),
|
||||
})
|
||||
),
|
||||
"Failed to create blueprint from content with id " + contentId
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user