fix kevacoin-php api

This commit is contained in:
ghost 2023-12-05 04:27:44 +02:00
parent 060170c2fa
commit 666dd91a3e
2 changed files with 9 additions and 3 deletions

View File

@ -48,11 +48,17 @@ class ModuleController extends AbstractController
$this->getParameter('app.kevacoin.password') $this->getParameter('app.kevacoin.password')
); );
$list = [];
foreach ((array) $client->kevaListNamespaces() as $value)
{
$list[$value['namespaceId']] = $value['displayName'];
}
return $this->render( return $this->render(
'default/module/room.html.twig', 'default/module/room.html.twig',
[ [
'room' => $request->get('room'), 'room' => $request->get('room'),
'list' => (array) $client->kevaListNamespaces() 'list' => $list
] ]
); );
} }

View File

@ -99,9 +99,9 @@ class RoomController extends AbstractController
// Check namespace exist for this wallet // Check namespace exist for this wallet
$namespaces = []; $namespaces = [];
foreach ((array) $client->kevaListNamespaces() as $key => $value) foreach ((array) $client->kevaListNamespaces() as $value)
{ {
$namespaces[] = $key; $namespaces[] = $value['namespaceId'];
} }
if (!in_array($request->get('namespace'), $namespaces)) if (!in_array($request->get('namespace'), $namespaces))