bigly-chat/docs/api/followjson.php
2025-02-06 07:07:35 -05:00

17 lines
363 B
PHP

<?php
require(__DIR__ . "/../../libs/page.php");
function get_handler()
{
global $db;
$stmt = $db->prepare("SELECT * FROM main.follow WHERE username IN (SELECT username FROM auth)");
$stmt->execute([]);
$result = $stmt->fetchAll(PDO::FETCH_DEFAULT);
$result = array_reverse($result, true);
echo json_encode($result);
}
get_handler();