router.get("/changelog", function(req, res, next) { res.locals.changelogHtml = marked(global.changelogMarkdown); res.render("changelog"); next(); });
Promise.all(promises.map(utils.reflectPromise)).then(function() { res.render("address"); next(); }).catch(function(err) { res.locals.pageErrors.push(utils.logError("32197rgh327g2", err)); res.render("address"); next(); });
router.get("/mining-summary", function(req, res, next) { coreApi.getBlockchainInfo().then(function(getblockchaininfo) { res.locals.currentBlockHeight = getblockchaininfo.blocks; res.render("mining-summary"); next(); }).catch(function(err) { res.locals.userMessage = "Error: " + err; res.render("mining-summary"); next(); }); });
app.use(function (req, res, next) { if (req.session && req.session.admin) res.locals.admin = true; next(); });
router.get("/admin", function(req, res, next) { res.locals.appStartTime = global.appStartTime; res.locals.memstats = v8.getHeapStatistics(); res.locals.rpcStats = global.rpcStats; res.locals.electrumStats = global.electrumStats; res.locals.cacheStats = global.cacheStats; res.locals.errorStats = global.errorStats; res.render("admin"); next(); });
router.get("/formatCurrencyAmount/:amt", function(req, res, next) { res.locals.currencyValue = req.params.amt; res.render("includes/value-display"); next(); });
router.get("/difficulty-history", function(req, res, next) { coreApi.getBlockchainInfo().then(function(getblockchaininfo) { res.locals.blockCount = getblockchaininfo.blocks; res.render("difficulty-history"); next(); }).catch(function(err) { res.locals.userMessage = "Error: " + err; res.render("difficulty-history"); next(); }); });