This commit is contained in:
@@ -139,6 +139,30 @@ namespace AyaNova.Api.Controllers
|
||||
return Ok(ApiOkResponse.Response(ret));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Delete pending notification event
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
/// <returns>NoContent</returns>
|
||||
[HttpDelete("notify-event/{id}")]
|
||||
public async Task<IActionResult> DeleteNotifyEvent([FromRoute] long id)
|
||||
{
|
||||
if (!serverState.IsOpen)
|
||||
return StatusCode(503, new ApiErrorResponse(serverState.ApiErrorCode, null, serverState.Reason));
|
||||
if (!ModelState.IsValid)
|
||||
return BadRequest(new ApiErrorResponse(ModelState));
|
||||
if (!Authorized.HasDeleteRole(HttpContext.Items, AyaType.OpsNotificationSettings))
|
||||
{
|
||||
return StatusCode(403, new ApiNotAuthorizedResponse());
|
||||
}
|
||||
var n = await ct.NotifyEvent.FirstOrDefaultAsync(z => z.Id == id);
|
||||
if (n == null)
|
||||
return BadRequest(new ApiErrorResponse(ApiErrorCode.NOT_FOUND, "id"));
|
||||
ct.NotifyEvent.Remove(n);
|
||||
await ct.SaveChangesAsync();
|
||||
return NoContent();
|
||||
}
|
||||
|
||||
|
||||
//------------
|
||||
|
||||
|
||||
@@ -1902,5 +1902,7 @@
|
||||
"ConnectionSecurity": "SMTP-Verbindungssicherheit",
|
||||
"SmtpServerPort": "SMTP-Server-Port",
|
||||
"NotifyFromAddress": "SMTP-Benachrichtigungsadresse",
|
||||
"AyaNovaServerURL": "AyaNova Server URL"
|
||||
"AyaNovaServerURL": "AyaNova Server URL",
|
||||
"DeliverAfter":"Liefern nach",
|
||||
"NotifyQueue":"Warteschlange für Benachrichtigungszustellung"
|
||||
}
|
||||
@@ -1902,5 +1902,7 @@
|
||||
"ConnectionSecurity": "SMTP connection security",
|
||||
"SmtpServerPort": "SMTP server port",
|
||||
"NotifyFromAddress": "SMTP notify from address",
|
||||
"AyaNovaServerURL": "AyaNova server URL"
|
||||
"AyaNovaServerURL": "AyaNova server URL",
|
||||
"DeliverAfter":"Deliver after",
|
||||
"NotifyQueue":"Notify event delivery queue"
|
||||
}
|
||||
@@ -1902,5 +1902,7 @@
|
||||
"ConnectionSecurity": "Seguridad de conexión del servidor SMTP",
|
||||
"SmtpServerPort": "Puerto SMTP",
|
||||
"NotifyFromAddress": "Notificación SMTP desde la dirección",
|
||||
"AyaNovaServerURL": "URL del servidor AyaNova"
|
||||
"AyaNovaServerURL": "URL del servidor AyaNova",
|
||||
"DeliverAfter":"Entregar después",
|
||||
"NotifyQueue":"Notificar cola de entrega de eventos"
|
||||
}
|
||||
@@ -1902,5 +1902,7 @@
|
||||
"ConnectionSecurity": "Sécurité de la connexion SMTP",
|
||||
"SmtpServerPort": "Port du serveur SMTP",
|
||||
"NotifyFromAddress": "Notification SMTP envoyée depuis l'adresse",
|
||||
"AyaNovaServerURL": "URL du serveur AyaNova"
|
||||
"AyaNovaServerURL": "URL du serveur AyaNova",
|
||||
"DeliverAfter":"Livrer après",
|
||||
"NotifyQueue":"Notifier file d'attente de remise des événements"
|
||||
}
|
||||
Reference in New Issue
Block a user