1
0
Fork 0
SSObaseApp_nodeJS/bin/web/auth/routes/static.js

24 lines
484 B
JavaScript
Raw Normal View History

2019-09-08 17:43:52 +00:00
var express = require('express');
var route = express.Router();
route.all('/', function(req, res, next) {
// TODO: show login page or dashboard
// res.end('login or dashboard');
res.render('auth/views/index');
});
route.all('/*', (req, res, next) => {
// passthrough to next route
if(req.path.startsWith('/api'))
return next();
// TODO: try to login
// TODO: role-based authorization
// TODO: show login page or page
res.end('500 - LEL');
});
module.exports = route;