Initial financial project import
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
require_once __DIR__ . '/../app/lib/auth.php';
|
||||
require_once __DIR__ . '/../app/lib/transaction_service.php';
|
||||
|
||||
check_auth();
|
||||
|
||||
if (($_SERVER['REQUEST_METHOD'] ?? '') !== 'POST') {
|
||||
http_response_code(405);
|
||||
exit('Method not allowed.');
|
||||
}
|
||||
|
||||
$id = (int)($_POST['id'] ?? 0);
|
||||
|
||||
if ($id > 0) {
|
||||
delete_transaction($id, user_id());
|
||||
}
|
||||
|
||||
header('Location: /transactions.php');
|
||||
exit;
|
||||
Reference in New Issue
Block a user