예제 #1
0
        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()));
        }
예제 #2
0
        public async Task <ActionResult> ConfirmDelete(Lab lab)
        {
            await LabsDao.Delete(this, lab);

            return(RedirectToAction("Index"));
        }