removed trending from homepage
This commit is contained in:
parent
45d1aca1c8
commit
709db8e741
2 changed files with 3 additions and 12 deletions
|
@ -1,19 +1,11 @@
|
||||||
const logger = require('winston');
|
const logger = require('winston');
|
||||||
const { postToStats, getTrendingClaims } = require('../controllers/statsController.js');
|
const { postToStats } = require('../controllers/statsController.js');
|
||||||
const errorHandlers = require('../helpers/libraries/errorHandlers.js');
|
|
||||||
|
|
||||||
module.exports = app => {
|
module.exports = app => {
|
||||||
// route for the home page
|
// route for the home page
|
||||||
app.get('/', ({ headers, ip, originalUrl }, res) => {
|
app.get('/', ({ headers, ip, originalUrl }, res) => {
|
||||||
const startDate = new Date();
|
// send response
|
||||||
startDate.setDate(startDate.getDate() - 1);
|
res.status(200).render('index');
|
||||||
getTrendingClaims(startDate)
|
|
||||||
.then(result => {
|
|
||||||
res.status(200).render('index', { trendingAssets: result });
|
|
||||||
})
|
|
||||||
.catch(error => {
|
|
||||||
errorHandlers.handleRequestError(error, res);
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
// a catch-all route if someone visits a page that does not exist
|
// a catch-all route if someone visits a page that does not exist
|
||||||
app.use('*', ({ originalUrl, ip }, res) => {
|
app.use('*', ({ originalUrl, ip }, res) => {
|
||||||
|
|
|
@ -3,7 +3,6 @@
|
||||||
<div class="full">
|
<div class="full">
|
||||||
{{> publish}}
|
{{> publish}}
|
||||||
{{> learnMore}}
|
{{> learnMore}}
|
||||||
{{> trending}}
|
|
||||||
</div>
|
</div>
|
||||||
{{> footer}}
|
{{> footer}}
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in a new issue