test app: fix triplicate route name

This commit is contained in:
Alice Gaudon 2024-09-21 18:40:11 +02:00
parent 6031d3a2e6
commit aa059527ad

View File

@ -71,14 +71,14 @@ export function authAppProvider(withUsername: boolean = true, approvalMode: bool
const proof = await PasswordAuthProof.getProofForSession(req.getSession()); const proof = await PasswordAuthProof.getProofForSession(req.getSession());
if (proof) res.sendStatus(200); if (proof) res.sendStatus(200);
else res.sendStatus(404); else res.sendStatus(404);
}, 'is-auth'); }, 'has-any-password-auth-proof');
this.get('/has-any-magic-link', async (req, res) => { this.get('/has-any-magic-link', async (req, res) => {
const proofs = await MagicLink.select() const proofs = await MagicLink.select()
.where('session_id', req.getSession().id) .where('session_id', req.getSession().id)
.get(); .get();
if (proofs.length > 0) res.sendStatus(200); if (proofs.length > 0) res.sendStatus(200);
else res.sendStatus(404); else res.sendStatus(404);
}, 'is-auth'); }, 'has-any-magic-link');
} }
}()); }());