Функция поиска по постам

Мне это всё расписывать что-ли? Смотрите в содержание коммита, мне феерически индифферентно
This commit is contained in:
2024-03-07 19:58:39 +03:00
parent 8700a544b9
commit 62b7b68976
24 changed files with 804 additions and 36 deletions

View File

@@ -4,7 +4,7 @@
// Includes
if ($IS_FRONTEND) {
if (isset($IS_FRONTEND) && $IS_FRONTEND) {
require_once("api/_auth.php");
require_once("api/_utils.php");
require_once("api/_errorslist.php");
@@ -61,7 +61,7 @@ function Post_GetByID (int $id): ReturnT {
$result = array();
$s = $db->prepare("SELECT * FROM posts WHERE id = ?");
$s->bind_param("s", $id);
$s->bind_param("i", $id);
$s->execute();
$d = $s->get_result()->fetch_assoc();
@@ -97,7 +97,7 @@ function Post_GetByID (int $id): ReturnT {
* METHOD
* Get post information by ID
*/
function Post_GetByID_Method (array $req) {
function Post_GetByID_Method (array $req): ReturnT {
// Input sanity checks
$PostID = null;