Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

Bot Dashboard errror #60

Open
Diego77648 opened this issue Aug 28, 2022 · 1 comment
Open

Bot Dashboard errror #60

Diego77648 opened this issue Aug 28, 2022 · 1 comment

Comments

@Diego77648
Copy link

Ive added:
Checkauth.js:
module.exports = async (req, res, next) => {
if(!req.session.user){
const redirectURL = ((req.originalUrl.includes("login") || req.originalUrl === "/") ? "/selector" : req.originalUrl);
const state = Math.random().toString(36).substring(5);
req.client.states[state] = redirectURL;
return res.redirect(/api/login?state=${state});
}
return next();
};

But then this error:
[error] Failed to launch dashboard : 'Invalid regular expression flags'

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants
@Diego77648 and others