mirror of
https://github.com/flextype/flextype.git
synced 2025-08-15 09:34:14 +02:00
feat(endpoints): use id
instead of key
for registry endpoint
This commit is contained in:
@@ -42,15 +42,15 @@ class Registry extends Api
|
||||
count($result = $this->validateApiRequest([
|
||||
'request' => $request,
|
||||
'api' => 'registry',
|
||||
'params' => ['token', 'key'],
|
||||
'params' => ['token', 'id'],
|
||||
])) > 0
|
||||
) {
|
||||
return $this->getApiResponse($response, $this->getStatusCodeMessage($result['http_status_code']), $result['http_status_code']);
|
||||
}
|
||||
|
||||
// Get registry data
|
||||
$registryData = registry()->get($requestQueryParams['key'], $requestQueryParams['default'] ?? null);
|
||||
$registryData = registry()->get($requestQueryParams['id'], $requestQueryParams['default'] ?? null);
|
||||
|
||||
return $this->getApiResponse($response, ['key' => $requestQueryParams['key'], 'value' => $registryData], 200);
|
||||
return $this->getApiResponse($response, ['id' => $requestQueryParams['id'], 'value' => $registryData], 200);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user