Browse Source

Fixed the patch endpoint.

pull/206/head
Sebastian Stehle 8 years ago
parent
commit
c93f27b98d
  1. 2
      src/Squidex.Domain.Apps.Entities/Contents/ContentDomainObject.cs
  2. 2
      src/Squidex/Areas/Api/Controllers/Content/Generator/SchemaSwaggerGenerator.cs

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

@ -67,7 +67,7 @@ namespace Squidex.Domain.Apps.Entities.Contents
{ {
VerifyCreatedAndNotDeleted(); VerifyCreatedAndNotDeleted();
var newData = State.Data.MergeInto(command.Data); var newData = command.Data.MergeInto(State.Data);
if (!newData.Equals(State.Data)) if (!newData.Equals(State.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.Summary = $"Patchs a {schemaName} content.";
operation.Security = EditorSecurity; operation.Security = EditorSecurity;
operation.AddBodyParameter("data", contentSchema, SchemaBodyDescription); operation.AddBodyParameter("data", dataSchema, SchemaBodyDescription);
operation.AddResponse("201", $"{schemaName} item patched.", dataSchema); operation.AddResponse("201", $"{schemaName} item patched.", dataSchema);
}); });

Loading…
Cancel
Save