public async Task <IHttpActionResult> Delete(long labId) { var(_, isLabManager) = await GetLab(labId); var result = await LabsDao.Delete(this, labId); if (result == null) { return(NotFound()); } return(JsonWithPermissions(result, User.IsPrivileged(), isLabManager, User.IsAdmin())); }
public async Task <ActionResult> ConfirmDelete(Lab lab) { await LabsDao.Delete(this, lab); return(RedirectToAction("Index")); }