]> PHS Git Server - phs-api.git/commitdiff
Cleaning up the revoke client function and starting on the create client function...
authorcharleswrayjr <charleswrayjr@gmail.com>
Tue, 9 Sep 2025 04:19:39 +0000 (23:19 -0500)
committercharleswrayjr <charleswrayjr@gmail.com>
Tue, 9 Sep 2025 04:19:39 +0000 (23:19 -0500)
src/controllers/vpn.controller.js

index 2b6b0f0681d035b0ed444277c2829018e95761c2..7fdcda938ead0bb0e64079f7951b4fc0b6141300 100644 (file)
@@ -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 }` : '' }`,