test followjson
This commit is contained in:
parent
096f8e9012
commit
4562f56993
1 changed files with 16 additions and 0 deletions
16
docs/api/followjson.php
Normal file
16
docs/api/followjson.php
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
<?php
|
||||||
|
require(__DIR__ . "/../../libs/page.php");
|
||||||
|
|
||||||
|
function get_handler() {
|
||||||
|
global $db;
|
||||||
|
|
||||||
|
$stmt = $db->prepare("SELECT * FROM main.follow");
|
||||||
|
$stmt->execute([]);
|
||||||
|
$result = $stmt->fetchAll(PDO::FETCH_DEFAULT);
|
||||||
|
$result = array_reverse($result,true);
|
||||||
|
|
||||||
|
echo json_encode($result);
|
||||||
|
}
|
||||||
|
|
||||||
|
get_handler();
|
||||||
|
?>
|
Loading…
Reference in a new issue