feat: require an api key to schedule
This commit is contained in:
@@ -42,6 +42,8 @@ function handle_get(): never
|
||||
|
||||
function handle_post(): never
|
||||
{
|
||||
require_api_key();
|
||||
|
||||
$body = json_body();
|
||||
$templateId = (int) ($body['template_id'] ?? 0);
|
||||
$mode = (string) ($body['mode'] ?? '');
|
||||
@@ -104,6 +106,8 @@ function handle_post(): never
|
||||
|
||||
function handle_put(): never
|
||||
{
|
||||
require_api_key();
|
||||
|
||||
$id = (int) ($_GET['id'] ?? 0);
|
||||
if ($id <= 0) {
|
||||
error_out('Missing or invalid id');
|
||||
|
||||
Reference in New Issue
Block a user