$mailbox = new Mailbox($db, $user); $subtitles = new Subtitles($db, $user, $log, $torrent, $mailbox); httpResponse($subtitles->delete((int) $params[1], $_GET["reason"])); break; case validateRoute('GET', 'donations'): $donations = new Donations($db, $user); list($result, $totalCount) = $donations->query(array("limit" => $_GET["limit"], "index" => $_GET["index"])); httpResponse($result, $totalCount); break; case validateRoute('POST', 'donations'): $donate = new Donations($db, $user); httpResponse($donate->create($postdata)); break; case validateRoute('PATCH', 'donations/\\d+'): $donate = new Donations($db, $user); httpResponse($donate->update((int) $params[1], $postdata)); break; case validateRoute('DELETE', 'donations/\\d+'): $donate = new Donations($db, $user); httpResponse($donate->delete((int) $params[1], $postdata)); break; case validateRoute('GET', 'login-attempts'): $loginAttempts = new LoginAttempts($db, $user); list($result, $totalCount) = $loginAttempts->query(array("limit" => $_GET["limit"], "index" => $_GET["index"])); httpResponse($result, $totalCount); break; case validateRoute('DELETE', 'login-attempts/\\d+'): $loginAttempts = new LoginAttempts($db, $user); httpResponse($loginAttempts->delete((int) $params[1])); break; case validateRoute('GET', 'signups'):