Browse Source

fix kevacoin-php api

main
ghost 1 year ago
parent
commit
666dd91a3e
  1. 8
      src/Controller/ModuleController.php
  2. 4
      src/Controller/RoomController.php

8
src/Controller/ModuleController.php

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

4
src/Controller/RoomController.php

@ -99,9 +99,9 @@ class RoomController extends AbstractController @@ -99,9 +99,9 @@ class RoomController extends AbstractController
// Check namespace exist for this wallet
$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))

Loading…
Cancel
Save