From: charleswrayjr Date: Tue, 9 Sep 2025 15:01:07 +0000 (-0500) Subject: Cleaning out debugging logs that I don't need anymore. X-Git-Url: https://git.phasecustomsoft.com/favicon.ico?a=commitdiff_plain;h=a538c6b96bc8fa6c2fda4d369bb42be5a344d1d7;p=phs-api.git Cleaning out debugging logs that I don't need anymore. --- diff --git a/src/controllers/vpn.controller.js b/src/controllers/vpn.controller.js index c936b9a..5522096 100644 --- a/src/controllers/vpn.controller.js +++ b/src/controllers/vpn.controller.js @@ -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,