Endpoints

This commit is contained in:
2024-07-22 21:38:21 +02:00
parent 5251c43a6b
commit 700faf4351
10 changed files with 367 additions and 158 deletions
+2 -1
View File
@@ -14,7 +14,8 @@ class Posts extends Api
{
$page = max(0, intval(Input::get("p", 0)));
$limit = constrain(0, 30, intval(Input::get("l", 10)));
$authed = Request::header("token") !== null;
$authed = Request::token() !== null;
Response::json(Post::list($page, $limit, $authed));
}
}