Refactor SettingsGetSignature to update parameter handling by changing 'uuid' to 'signature_uuid' and ensure proper type casting for signature retrieval.
https://github.com/nosial/Socialbox-PHP/issues/62
This commit is contained in:
parent
9806c317e9
commit
97f2c17282
1 changed files with 3 additions and 3 deletions
|
@ -19,14 +19,14 @@
|
||||||
*/
|
*/
|
||||||
public static function execute(ClientRequest $request, RpcRequest $rpcRequest): ?SerializableInterface
|
public static function execute(ClientRequest $request, RpcRequest $rpcRequest): ?SerializableInterface
|
||||||
{
|
{
|
||||||
if(!$rpcRequest->containsParameter('uuid') && $rpcRequest->getParameter('uuid') !== null)
|
if(!$rpcRequest->containsParameter('signature_uuid'))
|
||||||
{
|
{
|
||||||
throw new MissingRpcArgumentException('uuid');
|
throw new MissingRpcArgumentException('signature_uuid');
|
||||||
}
|
}
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
$key = SigningKeysManager::getSigningKey($request->getPeer()->getUuid(), $rpcRequest->getParameter('uuid'));
|
$key = SigningKeysManager::getSigningKey($request->getPeer()->getUuid(), (string)$rpcRequest->getParameter('signature_uuid'));
|
||||||
}
|
}
|
||||||
catch (DatabaseOperationException $e)
|
catch (DatabaseOperationException $e)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Reference in a new issue