Test
This commit is contained in:
parent
05668e305f
commit
8c476d2ec8
|
@ -26,7 +26,6 @@ router.get('/add', async (req, res) => { // Render form to add new ACL entry
|
|||
doorList[col.Field] = false;
|
||||
}
|
||||
});
|
||||
console.log(doorList)
|
||||
res.render('acl-add', { user: req.session.user, doorList });
|
||||
|
||||
}).catch(err => {
|
||||
|
@ -38,7 +37,6 @@ router.get('/add', async (req, res) => { // Render form to add new ACL entry
|
|||
router.put('/', async (req, res) => { // Attempt to create new ACL entry. Fail if cardNumber already exists
|
||||
const data = req.body;
|
||||
const cardNumber = new Number(data.CardNumber);
|
||||
console.log(data)
|
||||
if (isNaN(cardNumber) || cardNumber <= 0) {
|
||||
return res.status(400).json({ error: 'Invalid card number' });
|
||||
}
|
||||
|
|
|
@ -130,7 +130,6 @@
|
|||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify(data)
|
||||
}).then(res => {
|
||||
console.log(res.status, res.statusText);
|
||||
if (res.ok) window.location.href = '/acl';
|
||||
else alert('Failed to update ACL entry');
|
||||
}).catch(err => {
|
||||
|
|
|
@ -130,7 +130,6 @@
|
|||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify(data)
|
||||
}).then(res => {
|
||||
console.log(res.status, res.statusText);
|
||||
if (res.ok) window.location.href = '/acl';
|
||||
else alert('Failed to update ACL entry');
|
||||
}).catch(err => {
|
||||
|
|
|
@ -130,7 +130,6 @@
|
|||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify(data)
|
||||
}).then(res => {
|
||||
console.log(res.status, res.statusText);
|
||||
if (res.ok) window.location.href = '/acl';
|
||||
else alert('Failed to update ACL entry');
|
||||
}).catch(err => {
|
||||
|
|
Loading…
Reference in a new issue