]> PHS Git Server - phs-api.git/commitdiff
Cleaning out debugging logs that I don't need anymore.
authorcharleswrayjr <charleswrayjr@gmail.com>
Tue, 9 Sep 2025 15:01:07 +0000 (10:01 -0500)
committercharleswrayjr <charleswrayjr@gmail.com>
Tue, 9 Sep 2025 15:01:07 +0000 (10:01 -0500)
src/controllers/vpn.controller.js

index c936b9a631bdea24d767e5e1629c66d1b597a565..5522096c85adfde49c9d6612c296a0baf70c8c3c 100644 (file)
@@ -165,28 +165,19 @@ module.exports = {
           if (code !== 0) {
             return next(new createError(500, `Command failed: ${output}`));
           }
-          console.log(output);
           const clients = [];
           const ccdFiles = output.split('\n').filter(line => !line.endsWith('.crt') && !line.endsWith('.ovpn')).filter( l => !l.startsWith('.') && l !== '' && !l.endsWith('server'));
           const crtFiles = output.split('\n').filter(line => line.endsWith('.crt')).filter( l => !l.startsWith('.') && l !== ''  && !l.endsWith('server.crt'));
           const ovpnFiles = output.split('\n').filter(line => line.endsWith('.ovpn')).filter( l => !l.startsWith('.') && l !== '');
-          console.log(ovpnFiles);
-          console.log(ccdFiles);
-          console.log(crtFiles);
 
           // Process .ccd files for static IPs
           for (const ccdFile of ccdFiles) {
             const clientName = path.basename( ccdFile, '' );
-            logger.warn( `Processing ${ ccdFile } with clientName ${ clientName }`);
             try {
               const ccdContent = fs.readFileSync( ccdFile, 'utf8' );
-              logger.warn( `ccdContent: ${ ccdContent }`);
               const staticIpMatch = ccdContent.match( /ifconfig-push (\S+)/ );
-              logger.warn( `staticIpMatch: ${ staticIpMatch }`);
               const hasCrt = crtFiles.some( crt => crt.includes( `${ clientName }.crt` ) );
-              logger.warn(`hasCrt: ${ hasCrt }`);
               const hasOvpn = ovpnFiles.some( ovpn => ovpn.includes( `${ clientName }.ovpn` ) );
-              logger.warn(`hasOvpn: ${ hasOvpn }`);
               clients.push( {
                 clientName,
                 staticIp:staticIpMatch ? staticIpMatch[1] : null,