Add settings-gated appointment notifications and fix Bird key validation.
Deploy Ladill Care / deploy (push) Successful in 58s
Deploy Ladill Care / deploy (push) Successful in 58s
Patients can be SMS/email notified on booking and video schedule when enabled in Settings. Bird validation now accepts only lsk_live_ keys, strips paste artifacts, and surfaces the platform error. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -27,7 +27,15 @@ class CustomerEmailClient
|
||||
->get($this->base().'/me');
|
||||
|
||||
if ($res->status() === 401) {
|
||||
return ['ok' => false, 'error' => 'Invalid Bird API key.', 'status' => 401];
|
||||
$platformError = trim((string) ($res->json('error') ?: ''));
|
||||
|
||||
return [
|
||||
'ok' => false,
|
||||
'error' => $platformError !== ''
|
||||
? $platformError
|
||||
: 'Invalid Bird API key. Use the HTTP API key from bird.ladill.com (starts with lsk_live_).',
|
||||
'status' => 401,
|
||||
];
|
||||
}
|
||||
|
||||
if ($res->failed()) {
|
||||
|
||||
Reference in New Issue
Block a user