]> PHS Git Server - phs-api.git/commitdiff
Fixing closures on app.js file.
authorcharleswrayjr <charleswrayjr@gmail.com>
Mon, 8 Sep 2025 18:54:02 +0000 (13:54 -0500)
committercharleswrayjr <charleswrayjr@gmail.com>
Mon, 8 Sep 2025 18:54:02 +0000 (13:54 -0500)
src/controllers/vpn.controller.js

index 59a3ad3bbfaaedd7f3b7734dde418458a3abeb2b..3c93d9fba0c357da1d597d028fbfd8282b998bb8 100644 (file)
@@ -126,9 +126,7 @@ module.exports = {
     } ).connect( sshConfig );
   },
   getClients:async ( req, res, next ) => {
-    const error = new createError( 400, 'Not implemented yet' );
-    next( error );
-    /*const conn = new Client();
+    const conn = new Client();
     conn.on( 'ready', () => {
       const command = `cat /var/log/openvpn/openvpn-status.log`;
       conn.exec( command, ( err, stream ) => {
@@ -154,6 +152,6 @@ module.exports = {
     } ).on( 'error', ( err ) => {
       const error = new createError( 500, `SSH connection failed: ${ err.message }` );
       next( error );
-    } ).connect( sshConfig );*/
+    } ).connect( sshConfig );
   }
 };
\ No newline at end of file