public async Task <IActionResult> Delete([FromBody] Guid id) { var alias = await _service.Delete(id); if (alias != null) { var result = await _service.GetList(alias.SiteId); result.Status = new StatusMessage { Type = StatusMessage.Success, Body = _localizer.Alias["The alias was successfully deleted"] }; return(Ok(result)); } return(NotFound()); }
public async Task <IActionResult> Delete(Guid id) { var alias = await _service.Delete(id); if (alias != null) { var result = await _service.GetList(alias.SiteId); result.Status = new StatusMessage { Type = StatusMessage.Success, Body = $"The alias <code>{ alias.AliasUrl }</code> was deleted" }; return(Ok(result)); } return(NotFound()); }