Browse Source

Bugfixes when reading events.

pull/334/head
Sebastian Stehle 7 years ago
parent
commit
db2d28c3e8
  1. 6
      src/Squidex.Domain.Apps.Core.Operations/HandleRules/EnrichedEvents/EnrichedEvent.cs
  2. 1
      src/Squidex/Areas/Api/Controllers/Rules/RulesController.cs
  3. 4
      src/Squidex/app/features/rules/pages/rules/triggers/content-changed-trigger.component.html

6
src/Squidex.Domain.Apps.Core.Operations/HandleRules/EnrichedEvents/EnrichedEvent.cs

@ -15,6 +15,9 @@ namespace Squidex.Domain.Apps.Core.HandleRules.EnrichedEvents
{ {
public abstract class EnrichedEvent public abstract class EnrichedEvent
{ {
[JsonIgnore]
public abstract Guid AggregateId { get; }
public NamedId<Guid> AppId { get; set; } public NamedId<Guid> AppId { get; set; }
public RefToken Actor { get; set; } public RefToken Actor { get; set; }
@ -23,9 +26,6 @@ namespace Squidex.Domain.Apps.Core.HandleRules.EnrichedEvents
public long Version { get; set; } public long Version { get; set; }
[JsonIgnore]
public abstract Guid AggregateId { get; }
[JsonIgnore] [JsonIgnore]
public string Name { get; set; } public string Name { get; set; }

1
src/Squidex/Areas/Api/Controllers/Rules/RulesController.cs

@ -235,6 +235,7 @@ namespace Squidex.Areas.Api.Controllers.Rules
[HttpGet] [HttpGet]
[Route("apps/{app}/rules/events/")] [Route("apps/{app}/rules/events/")]
[ProducesResponseType(typeof(RuleEventsDto), 200)] [ProducesResponseType(typeof(RuleEventsDto), 200)]
[ApiPermission(Permissions.AppRulesRead)]
[ApiCosts(0)] [ApiCosts(0)]
public async Task<IActionResult> GetEvents(string app, [FromQuery] int skip = 0, [FromQuery] int take = 20) public async Task<IActionResult> GetEvents(string app, [FromQuery] int skip = 0, [FromQuery] int take = 20)
{ {

4
src/Squidex/app/features/rules/pages/rules/triggers/content-changed-trigger.component.html

@ -67,10 +67,10 @@
<input type="checkbox" [ngModel]="schema.sendUnpublish" (ngModelChange)="toggle(schema, 'sendUnpublish')" /> <input type="checkbox" [ngModel]="schema.sendUnpublish" (ngModelChange)="toggle(schema, 'sendUnpublish')" />
</td> </td>
<td class="text-center" title="Archived"> <td class="text-center" title="Archived">
<input type="checkbox" [ngModel]="schema.sendArchived" (ngModelChange)="toggle(schema, 'sendArchived')" /> <input type="checkbox" [ngModel]="schema.sendArchive" (ngModelChange)="toggle(schema, 'sendArchive')" />
</td> </td>
<td class="text-center" title="Restored"> <td class="text-center" title="Restored">
<input type="checkbox" [ngModel]="schema.sendRestored" (ngModelChange)="toggle(schema, 'sendRestored')" /> <input type="checkbox" [ngModel]="schema.sendRestore" (ngModelChange)="toggle(schema, 'sendRestore')" />
</td> </td>
<td class="text-center"> <td class="text-center">
<button type="button" class="btn btn-link btn-secondary" (click)="removeSchema(schema)"> <button type="button" class="btn btn-link btn-secondary" (click)="removeSchema(schema)">

Loading…
Cancel
Save