protected function do_delete() { parse_str(file_get_contents("php://input"), $_DELETE); if (empty($_DELETE["student_id"])) { $this->exit_error(400, "studentIDMandatoryAndNotEmpty"); } else { if (empty($_DELETE["team_id"])) { $this->exit_error(400, "teamIDMandatoryAndNotEmpty"); } else { $student_id = $_DELETE["student_id"]; $team_id = $_DELETE["team_id"]; TeamModel::removeStudentFromTeam($student_id, $team_id); } } }