Browse Source

Patch endpoint fixed

pull/203/merge
Sebastian Stehle 8 years ago
parent
commit
9b31088685
  1. 2
      src/Squidex.Domain.Apps.Write/Contents/ContentDomainObject.cs
  2. 2
      src/Squidex/Areas/Api/Controllers/Content/Generator/SchemaSwaggerGenerator.cs

2
src/Squidex.Domain.Apps.Write/Contents/ContentDomainObject.cs

@ -115,7 +115,7 @@ namespace Squidex.Domain.Apps.Write.Contents
{
VerifyCreatedAndNotDeleted();
var newData = Data.MergeInto(command.Data);
var newData = command.Data.MergeInto(Data);
if (!newData.Equals(Data))
{

2
src/Squidex/Areas/Api/Controllers/Content/Generator/SchemaSwaggerGenerator.cs

@ -174,7 +174,7 @@ namespace Squidex.Areas.Api.Controllers.Contents.Generator
operation.Summary = $"Patchs a {schemaName} content.";
operation.Security = EditorSecurity;
operation.AddBodyParameter("data", contentSchema, SchemaBodyDescription);
operation.AddBodyParameter("data", dataSchema, SchemaBodyDescription);
operation.AddResponse("201", $"{schemaName} item patched.", dataSchema);
});

Loading…
Cancel
Save