Some more refactoring

This commit is contained in:
Elitsa Marinovska
2021-01-12 16:01:09 +01:00
parent b0f4f9f440
commit 5feb273c3a
3 changed files with 5 additions and 5 deletions

View File

@@ -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");