Upload via GUI (258 Dateien)

This commit is contained in:
2026-10-16 19:12:13 +00:00
parent 893bef356c
commit 491b87f468
50 changed files with 4601 additions and 0 deletions
@@ -0,0 +1,18 @@
<?php
declare(strict_types=1);
require_once __DIR__ . '/common.php';
api_require_method('POST');
$staff = api_require_staff();
$body = api_request_body();
$number = trim((string) ($body['number'] ?? ''));
$type = (string) ($body['type'] ?? '');
$message = (string) ($body['message'] ?? '');
$setStatus = isset($body['setStatus']) ? (string) $body['setStatus'] : null;
if ($number === '') {
api_error(422, 'TICKET_NUMBER_REQUIRED', 'Eine Ticketnummer ist erforderlich.');
}
$pdo = get_db();
$ticket = api_find_ticket($pdo, $staff, $number);
$threadId = api_add_ticket_message($pdo, $staff, $ticket, $type, $message, $setStatus);
api_json(['threadId' => $threadId], 201);