Replace Upgrade to Pro with Report Issue for staff.
Deploy Ladill Queue / deploy (push) Successful in 38s
Deploy Ladill Queue / deploy (push) Successful in 38s
Non-owners submit Queue issues to Ladill admin via Identity. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -78,6 +78,24 @@ class IdentityTeamClient
|
||||
return (array) $response->json('data', []);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array{subject: string, message: string, priority?: string, tags?: list<string>} $payload
|
||||
* @return array<string, mixed>
|
||||
*/
|
||||
public function createSupportTicket(string $userPublicId, array $payload, string $app = 'queue'): array
|
||||
{
|
||||
$response = $this->request('post', '/identity/support/tickets', array_filter([
|
||||
'user' => $userPublicId,
|
||||
'subject' => $payload['subject'] ?? '',
|
||||
'message' => $payload['message'] ?? '',
|
||||
'priority' => $payload['priority'] ?? 'normal',
|
||||
'app' => $app,
|
||||
'tags' => $payload['tags'] ?? ['staff_issue'],
|
||||
], fn ($value) => $value !== null && $value !== ''));
|
||||
|
||||
return (array) $response->json('data', []);
|
||||
}
|
||||
|
||||
private function request(string $method, string $path, array $query = []): Response
|
||||
{
|
||||
$url = rtrim((string) config('identity.api_url'), '/').$path;
|
||||
|
||||
Reference in New Issue
Block a user