|
|
|
@ -384,23 +384,6 @@ public sealed class RulesController : ApiController |
|
|
|
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>
|
|
|
|
@ -427,6 +410,23 @@ public sealed class RulesController : ApiController |
|
|
|
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>
|
|
|
|
|