shields post endpoint

This commit is contained in:
emilyd 2022-11-26 10:36:06 +02:00
parent 590953d9bc
commit 00fdce204e

18
api/shields-posts.php Normal file
View File

@ -0,0 +1,18 @@
<?php
header('Content-Type: application/json');
require "../templates/config.php";
?>
{
"schemaVersion": 1,
"label": "blog posts",
"color": "lightgrey",
<?php
require "../creds.php";
$result = mysqli_query($mysqli, "SELECT COUNT(ID) FROM articles");
while($res = mysqli_fetch_array($result)) {
echo ' "message": "'.$res['COUNT(ID)'].'"',"\n";
}
?>
}