fix superusers auth

This commit is contained in:
Jonathan Martz
2025-06-07 09:21:26 +02:00
parent f9911ffc29
commit 81e8486870

View File

@@ -32,7 +32,8 @@ class Settings
$bodyParams['identity'] = $email;
$bodyParams['password'] = $password;
$output = $this->doRequest($this->url . "/api/collections/_superusers/auth-with-password", 'POST', $bodyParams);
self::$token = json_decode($output, true)['token'];
$data = json_decode($output, true);
self::$token = $data['token'] ?? '';
}
public function doRequest(string $url, string $method, $bodyParams = []): string