mirror of
https://github.com/DIYgod/RSSHub.git
synced 2025-12-16 11:37:44 +08:00
Github contributors add sort order
This commit is contained in:
@@ -4,6 +4,7 @@ const config = require('@/config').value;
|
||||
module.exports = async (ctx) => {
|
||||
const user = ctx.params.user;
|
||||
const repo = ctx.params.repo;
|
||||
const order = ctx.params.order;
|
||||
const anon = ctx.params.anon;
|
||||
|
||||
const host = `https://github.com/${user}/${repo}`;
|
||||
@@ -53,7 +54,7 @@ module.exports = async (ctx) => {
|
||||
|
||||
data.forEach(function(item) {
|
||||
const time = new Date();
|
||||
time.setMinutes(time.getMinutes() - data.length + index);
|
||||
time.setMinutes(time.getMinutes() + (order === 'asc' ? -data.length + index : -index));
|
||||
index++;
|
||||
|
||||
if (item.type === 'Anonymous') {
|
||||
|
||||
Reference in New Issue
Block a user