Files
newznab-tmux/public/pages/sendtocouch.php
T
2017-12-25 23:55:04 +01:00

25 lines
379 B
PHP

<?php
use App\Models\User;
use nntmux\CouchPotato;
if (! User::isLoggedIn()) {
$page->show403();
}
if (empty($_GET['id'])) {
$page->show404();
} else {
$cp = new CouchPotato($page);
if (empty($cp->cpurl)) {
$page->show404();
}
if (empty($cp->cpapi)) {
$page->show404();
}
$id = $_GET['id'];
$cp->sendToCouchPotato($id);
}