Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Fernando-Santana-j committed Oct 20, 2024
1 parent 6bd4d33 commit 9059194
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
1 change: 0 additions & 1 deletion functions.js
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,6 @@ module.exports = {
},
authGetState: async (req, res, next) => {
try {
console.log(req.session.uid);

if (!req.session.uid) return res.redirect('/?error=Faca login novamente!');

Expand Down
12 changes: 9 additions & 3 deletions public/js/userConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,18 @@ document.addEventListener('click', async (event) => {
const target = event.target;

if (target.closest('#desative-2fa')) {
passVerify('toogle2fa', 'admin', null, false)
passVerify(()=>{
toogle2fa(false)
}, 'admin', null, false)
}
if (target.closest('#active-2fa')) {
passVerify('toogle2fa', 'admin', null, true)
passVerify(()=>{
toogle2fa(true)
}, 'admin', null, true)
}
if (target.closest('#cadastro-2fa-button')) {
passVerify('cadastro2fa', 'admin', null)
passVerify(()=>{
cadastrar2fa()
}, 'admin', null)
}
})

0 comments on commit 9059194

Please sign in to comment.