Update api/answer.php

This commit is contained in:
2026-06-15 12:07:19 +02:00
parent a2ab3da89e
commit cb8bf3f1d1
+7
View File
@@ -10,6 +10,13 @@ requireLogin();
$user = $_SESSION['user']; $user = $_SESSION['user'];
function normalize(string $s): string
{
$s = strtolower(trim($s));
$s = preg_replace('/\s+/', ' ', $s);
return $s;
}
$input = json_decode(file_get_contents('php://input'), true); $input = json_decode(file_get_contents('php://input'), true);
$lang = $input['lang']; $lang = $input['lang'];