~fkooman/vpn-user-portal

5dac8f389bcce3ad83e1a26dc7b5a7ea672ac54c — François Kooman 2 months ago 3d5416b
add /connection_list Admin API call
1 files changed, 5 insertions(+), 0 deletions(-)

M src/Http/AdminApiModule.php
M src/Http/AdminApiModule.php => src/Http/AdminApiModule.php +5 -0
@@ 56,6 56,11 @@ class AdminApiModule implements ServiceModuleInterface
        );

        $service->get(
            '/v1/connection_list',
            fn(Request $request, UserInfo $userInfo): Response => new JsonResponse(['connection_list' => $this->connectionManager->get()])
        );

        $service->get(
            '/v1/users',
            fn(Request $request, UserInfo $userInfo): Response => new JsonResponse(['users' => self::extractUsers($this->storage->userList())])
        );