FIX_HR_API_ISSUE

This commit is contained in:
VENKATESHWARAN 2025-12-05 14:35:40 +05:30
parent 19096a99ae
commit 1231e28e99

View File

@ -87,16 +87,17 @@ class RestAuthenticationController extends AdminController
$options = [
'query' => $queryParams,
'http_errors' => false,
'headers' => [
'App-Signature' => getenv('APP_SIGNATURE'),
'Accept' => 'application/json'
]
];
if (isset($params['token']) && !empty($params['token'])) {
$options['headers'] = [
'Authorization' => 'Bearer ' . $params['token'],
'Accept' => 'application/json',
'App-Signature' => getenv('APP_SIGNATURE'),
];
if (!empty($params['token'])) {
$options['headers']['Authorization'] = 'Bearer ' . $params['token'];
}
$response = $client->get($url, $options);
return $response->getBody();