Browse Source

Reverse the order in the discussion page

pull/6/head
Menci 8 years ago
parent
commit
fe63f455c8
  1. 2
      modules/discussion.js

2
modules/discussion.js

@ -26,7 +26,7 @@ let User = syzoj.model('user');
app.get('/discussion', async (req, res) => {
try {
let paginate = syzoj.utils.paginate(await Article.count(), req.query.page, syzoj.config.page.discussion);
let articles = await Article.query(paginate, null, [['public_time', 'asc']]);
let articles = await Article.query(paginate, null, [['public_time', 'desc']]);
for (let article of articles) await article.loadRelationships();

Loading…
Cancel
Save