Some more refactoring
This commit is contained in:
@@ -621,7 +621,7 @@ namespace Umbraco.Web.BackOffice.Controllers
|
||||
/// </summary>
|
||||
[FileUploadCleanupFilter]
|
||||
[ContentSaveValidation]
|
||||
public async Task<ContentItemDisplay> PostSaveBlueprint([ModelBinder(typeof(BlueprintItemBinder))] ContentItemSave contentItem)
|
||||
public async Task<ActionResult<ContentItemDisplay>> PostSaveBlueprint([ModelBinder(typeof(BlueprintItemBinder))] ContentItemSave contentItem)
|
||||
{
|
||||
var contentItemDisplay = await PostSaveInternal(
|
||||
contentItem,
|
||||
@@ -641,7 +641,7 @@ namespace Umbraco.Web.BackOffice.Controllers
|
||||
return display;
|
||||
});
|
||||
|
||||
return contentItemDisplay.Value;
|
||||
return contentItemDisplay;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -557,7 +557,7 @@ namespace Umbraco.Web.BackOffice.Controllers
|
||||
if (invalidCompositionException != null)
|
||||
{
|
||||
AddCompositionValidationErrors<TContentTypeSave, TPropertyType>(contentTypeSave, invalidCompositionException.PropertyTypeAliases);
|
||||
throw CreateModelStateValidationException<TContentTypeSave, TContentTypeDisplay>(ctId, contentTypeSave, ct);
|
||||
return CreateModelStateValidationException<TContentTypeSave, TContentTypeDisplay>(ctId, contentTypeSave, ct);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -663,7 +663,7 @@ namespace Umbraco.Web.BackOffice.Controllers
|
||||
|
||||
public async Task<ActionResult<MediaItemDisplay>> PostAddFolder(PostedFolder folder)
|
||||
{
|
||||
var parentId = GetParentIdAsIntAsync(folder.ParentId, validatePermissions:true).Result.Value;
|
||||
var parentId = (await GetParentIdAsIntAsync(folder.ParentId, validatePermissions:true)).Value;
|
||||
if (!parentId.HasValue)
|
||||
{
|
||||
return NotFound("The passed id doesn't exist");
|
||||
@@ -695,7 +695,7 @@ namespace Umbraco.Web.BackOffice.Controllers
|
||||
}
|
||||
|
||||
//get the string json from the request
|
||||
var parentId = GetParentIdAsIntAsync(currentFolder, validatePermissions: true).Result.Value;
|
||||
var parentId = (await GetParentIdAsIntAsync(currentFolder, validatePermissions: true)).Value;
|
||||
if (!parentId.HasValue)
|
||||
{
|
||||
return NotFound("The passed id doesn't exist");
|
||||
|
||||
Reference in New Issue
Block a user