public async Task <IActionResult> DeleteAsync(int id) { logger.LogInformation("Delete badge was called"); if (await repository.DeleteBadgeById(id)) { Ok("api/badges"); } logger.LogError($"Failed to delete badge with an id: {id}"); return(BadRequest($"Failed to delete badge with an id: {id}")); }