public async Task <IActionResult> DeletePartyAsync(string ownerId) { try { ApplicationUser host = await _context.ApplicationUser.FirstOrDefaultAsync(u => u.Id == ownerId); if (host == null) { return(BadRequest("No Party Found With Given Host")); } if (await _partyHandler.DeletePartyAsync(host.AccountName)) { return(Ok("Party Deleted")); } else { return(BadRequest("Failed to Delete Party")); } } catch (Exception ex) { return(BadRequest(ex.Message)); } }