From: charleswrayjr Date: Tue, 9 Sep 2025 04:19:39 +0000 (-0500) Subject: Cleaning up the revoke client function and starting on the create client function... X-Git-Url: https://git.phasecustomsoft.com/%7B%60$%7BAPI_BASE_URL%7D/file/$%7Bf.id%7D/view%60%7D?a=commitdiff_plain;h=4b4b48d49a1ddb5300f6a090a6cbc5dc20f8b197;p=phs-api.git Cleaning up the revoke client function and starting on the create client function in the vpn controller. --- diff --git a/src/controllers/vpn.controller.js b/src/controllers/vpn.controller.js index 2b6b0f0..7fdcda9 100644 --- a/src/controllers/vpn.controller.js +++ b/src/controllers/vpn.controller.js @@ -86,7 +86,7 @@ module.exports = { stream.stderr.on( 'data', ( data ) => (output += data) ); stream.on( 'close', ( code ) => { conn.end(); - const final = fs.readFileSync( `/home/node/clients/${ clientName }.ovpn` ); + const final = fs.readFileSync( `/home/node/clients/${ clientName }.ovpn`, 'utf8' ); if (code === 0) { res.json( { message:`Client ${ clientName } created${ staticIp ? ` with IP ${ staticIp }` : '' }`,