Upload via GUI (258 Dateien)
This commit is contained in:
@@ -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);
|
||||
Reference in New Issue
Block a user