diff --git a/routes/acl.js b/routes/acl.js index 9c6c54c..03c28fe 100644 --- a/routes/acl.js +++ b/routes/acl.js @@ -20,10 +20,10 @@ router.get('/', async (req, res) => { router.get('/add', async (req, res) => { // Render form to add new ACL entry doorList = {} - await db.query('SHOW COLUMNS FROM ACL').then(columns => { + await db.query('SHOW COLUMNS FROM ACL;').then(columns => { columns.forEach(col => { if (col.name !== 'Name' && col.name !== 'CardNumber' && col.name !== 'PIN' && col.name !== 'StartDate' && col.name !== 'EndDate') { - doorList[col.name] = false; + doorList[col.Field] = false; } }); console.log(doorList)