From: charleswrayjr Date: Mon, 8 Sep 2025 18:54:02 +0000 (-0500) Subject: Fixing closures on app.js file. X-Git-Url: https://git.phasecustomsoft.com/favicon.ico?a=commitdiff_plain;h=bb6eaae8af4578f077153f7810f80818e58df4e6;p=phs-api.git Fixing closures on app.js file. --- diff --git a/src/controllers/vpn.controller.js b/src/controllers/vpn.controller.js index 59a3ad3..3c93d9f 100644 --- a/src/controllers/vpn.controller.js +++ b/src/controllers/vpn.controller.js @@ -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