38 lines
991 B
JavaScript
Raw Normal View History

2019-11-23 23:08:03 +02:00
/**
* This router handles things related to the web browser experience...
*/
// This is the mock data we working with...
module.exports = function (options) {
var express = options.express;
const db = options.db;
var router = express.Router();
router.route('/')
.get(function(request, response, next) {
response.render("home", {
user: request.user,
pageTitle: "HDAuth - Home"
})
});
2019-12-07 21:22:38 +02:00
router.route('/bsides')
.get(function(request, response, next) {
response.render("bsides", {
user: request.user,
pageTitle: "HDAuth - Bsides 2019"
})
});
2019-11-23 23:08:03 +02:00
// TODO: load child routers automatically
var accountRouter = require('./account/index.js')(options);
2019-12-04 21:46:42 +02:00
var xpubAuth = require('./xpub-auth/index.js')(options);
2019-11-23 23:08:03 +02:00
router.use('/account', accountRouter);
2019-12-04 21:46:42 +02:00
router.use('/xpub-auth', xpubAuth);
2019-11-23 23:08:03 +02:00
return router;
};