1
0
mirror of https://github.com/GOSTSec/gostexplr synced 2025-01-15 01:00:16 +00:00
gostexplr/routes/index.js

19 lines
380 B
JavaScript
Raw Normal View History

2018-02-03 21:14:56 +05:00
var models = require('../models');
var express = require('express');
var router = express.Router();
/* GET home page. */
2018-02-03 23:54:25 +05:00
router.get('/', async function(req, res, next) {
const blocks = await models.Block.findAll({
2018-02-06 22:29:42 +05:00
attributes: ['height', 'hash'],
2018-02-03 21:14:56 +05:00
order: [['height', 'DESC']],
limit: 30,
});
2018-02-03 23:54:25 +05:00
res.render('index', {
blocks,
});
2018-02-03 21:14:56 +05:00
});
module.exports = router;