getUser($request); $cs = new \CourseSet($args['id']); if (!$cs->getChdate()) { throw new RecordNotFoundException(); } if (!Authority::canUpdateCourseSet($user, $cs)) { throw new AuthorizationFailedException(); } $cs->delete(); return $this->getCodeResponse(204); } }