From 483d128b74bccc27487711b53a046563a8981baf Mon Sep 17 00:00:00 2001 From: dbauszus-glx Date: Thu, 23 Nov 2023 16:38:10 +0000 Subject: [PATCH] acl connection const --- mod/user/acl.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mod/user/acl.js b/mod/user/acl.js index 1418dcbb8..f19af9b8e 100644 --- a/mod/user/acl.js +++ b/mod/user/acl.js @@ -1,12 +1,12 @@ const { Pool } = require('pg'); +const connection = process.env.PRIVATE && process.env.PRIVATE.split('|') +|| process.env.PUBLIC && process.env.PUBLIC.split('|') + let pool = null module.exports = () => { - const connection = process.env.PRIVATE && process.env.PRIVATE.split('|') - || process.env.PUBLIC && process.env.PUBLIC.split('|') - if(!connection || !connection[1]) return const acl_table = connection[1].split('.').pop()