Browse Source

Fixed field deletion.

pull/364/head^2
Sebastian Stehle 7 years ago
parent
commit
c003054449
  1. 6
      src/Squidex/Areas/Api/Controllers/Schemas/SchemaFieldsController.cs

6
src/Squidex/Areas/Api/Controllers/Schemas/SchemaFieldsController.cs

@ -513,9 +513,11 @@ namespace Squidex.Areas.Api.Controllers.Schemas
[ApiCosts(1)]
public async Task<IActionResult> DeleteNestedField(string app, string name, long parentId, long id)
{
await CommandBus.PublishAsync(new DeleteField { ParentFieldId = parentId, FieldId = id });
var command = new DeleteField { ParentFieldId = parentId, FieldId = id };
return NoContent();
var response = await InvokeCommandAsync(app, command);
return Ok(response);
}
private async Task<SchemaDetailsDto> InvokeCommandAsync(string app, ICommand command)

Loading…
Cancel
Save