Restructure
New Journal entries
Colour tabs update with wind
This commit is contained in:
fraxle
2026-08-31 15:12:45 +01:00
parent 47818fba33
commit 71860b9dd9
40 changed files with 3430 additions and 443 deletions
+18
View File
@@ -0,0 +1,18 @@
<?php
// POST { id } -> deletes an entry the caller owns.
require __DIR__ . '/../lib/bootstrap.php';
require_method('POST');
$user = require_user();
$body = json_body();
$id = (int)($body['id'] ?? 0);
if ($id <= 0) json_error('Invalid id.');
$stmt = db()->prepare('DELETE FROM journal_entries WHERE id = ? AND user_id = ?');
$stmt->execute([$id, $user['id']]);
if ($stmt->rowCount() === 0) {
json_error('Entry not found.', 404);
}
json_out(['ok' => true]);