mirror of
https://github.com/github/codeql.git
synced 2025-12-29 07:06:43 +01:00
11 lines
282 B
JavaScript
11 lines
282 B
JavaScript
import {Router} from 'express';
|
|
|
|
const authRouter = new Router();
|
|
authRouter.get(/^\/admin\/(login|init)$/, middleware.adminInit, (req, res, next) => {
|
|
if (req.isAuthenticated()) {
|
|
res.redirect('/admin');
|
|
} else {
|
|
routeHandler(routes, reducers, req, res, next);
|
|
}
|
|
});
|