mirror of
https://codeberg.org/PostERG/xamxam.git
synced 2026-08-10 07:11:18 +02:00
24 lines
595 B
PHP
24 lines
595 B
PHP
<?php
|
|
/**
|
|
* PeerTube orphan video check endpoint (admin).
|
|
*
|
|
* GET /admin/actions/peertube-orphans.php
|
|
*
|
|
* Returns JSON with a list of PeerTube channel videos that are NOT linked to
|
|
* any TFE in the database.
|
|
*/
|
|
require_once __DIR__ . '/../../../bootstrap.php';
|
|
require_once __DIR__ . '/../../../src/AdminAuth.php';
|
|
|
|
AdminAuth::requireLogin();
|
|
|
|
if ($_SERVER['REQUEST_METHOD'] !== 'GET') {
|
|
http_response_code(405);
|
|
return;
|
|
}
|
|
|
|
require_once __DIR__ . '/_peertube-orphans-data.php';
|
|
|
|
header('Content-Type: application/json; charset=utf-8');
|
|
echo json_encode(getPeerTubeOrphansData());
|