|
|
@ -31,7 +31,7 @@ const timeAgo = new TimeAgo('zh-CN'); |
|
|
|
|
|
|
|
|
|
|
|
app.get('/', async (req, res) => { |
|
|
|
app.get('/', async (req, res) => { |
|
|
|
try { |
|
|
|
try { |
|
|
|
let ranklist = await User.query([1, 10], { is_show: true }, [[syzoj.config.sorting.ranklist.field, syzoj.config.sorting.ranklist.order]]); |
|
|
|
let ranklist = await User.query([1, syzoj.config.page.ranklist_index || 3], { is_show: true }, [[syzoj.config.sorting.ranklist.field, syzoj.config.sorting.ranklist.order]]); |
|
|
|
await ranklist.forEachAsync(async x => x.renderInformation()); |
|
|
|
await ranklist.forEachAsync(async x => x.renderInformation()); |
|
|
|
|
|
|
|
|
|
|
|
let notices = (await Article.query(null, { is_notice: true }, [['public_time', 'desc']])).map(article => ({ |
|
|
|
let notices = (await Article.query(null, { is_notice: true }, [['public_time', 'desc']])).map(article => ({ |
|
|
|