- Refactor comments/client id var
- Add basic read endpoint for docs, products, expenses, quotes and invoices
This commit is contained in:
Marcus Hill
2023-02-12 15:50:45 +00:00
parent 3f06c10997
commit 68005723e6
14 changed files with 180 additions and 78 deletions

View File

@@ -7,7 +7,11 @@ if ($_SERVER['REQUEST_METHOD'] !== "GET") {
exit();
}
// Wildcard client ID for most SELECT queries
// Wildcard client ID for most SELECT queries, unless otherwise specified (and allowed)
if ($client_id == 0) {
$client_id = "%";
}
if (isset($_GET['client_id'])) {
$client_id = intval($_GET['client_id']);
} else {
$client_id = "%";
}
}