Skip to content

Commit

Permalink
Just move some ode
Browse files Browse the repository at this point in the history
  • Loading branch information
SebastianStehle committed May 25, 2023
1 parent c76dc3f commit 5567c7c
Showing 1 changed file with 17 additions and 17 deletions.
34 changes: 17 additions & 17 deletions backend/src/Squidex/Areas/Api/Controllers/Rules/RulesController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -384,23 +384,6 @@ public async Task<IActionResult> PutEvent(string app, DomainId id)
return NoContent();
}

/// <summary>
/// Cancels all events.
/// </summary>
/// <param name="app">The name of the app.</param>
/// <response code="204">Events cancelled.</response>.
[HttpDelete]
[Route("apps/{app}/rules/events/")]
[ProducesResponseType(StatusCodes.Status204NoContent)]
[ApiPermissionOrAnonymous(PermissionIds.AppRulesEventsDelete)]
[ApiCosts(1)]
public async Task<IActionResult> DeleteEvents(string app)
{
await ruleEventsRepository.CancelByAppAsync(App.Id, HttpContext.RequestAborted);

return NoContent();
}

/// <summary>
/// Cancels an event.
/// </summary>
Expand All @@ -427,6 +410,23 @@ public async Task<IActionResult> DeleteEvent(string app, DomainId id)
return NoContent();
}

/// <summary>
/// Cancels all events.
/// </summary>
/// <param name="app">The name of the app.</param>
/// <response code="204">Events cancelled.</response>.
[HttpDelete]
[Route("apps/{app}/rules/events/")]
[ProducesResponseType(StatusCodes.Status204NoContent)]
[ApiPermissionOrAnonymous(PermissionIds.AppRulesEventsDelete)]
[ApiCosts(1)]
public async Task<IActionResult> DeleteEvents(string app)
{
await ruleEventsRepository.CancelByAppAsync(App.Id, HttpContext.RequestAborted);

return NoContent();
}

/// <summary>
/// Provide a list of all event types that are used in rules.
/// </summary>
Expand Down

0 comments on commit 5567c7c

Please sign in to comment.