renderAccounts: reverse the list of pubkeys

This commit is contained in:
Alex Gleason 2024-05-31 15:30:04 -05:00
parent b7943669b2
commit 2ff929ca95
No known key found for this signature in database
GPG Key ID: 7211D1F99744FBB7
2 changed files with 2 additions and 2 deletions

View File

@ -16,7 +16,7 @@ const mutesController: AppController = async (c) => {
if (event10000) {
const pubkeys = getTagSet(event10000.tags, 'p');
return renderAccounts(c, [...pubkeys].reverse());
return renderAccounts(c, [...pubkeys]);
} else {
return c.json([]);
}

View File

@ -44,7 +44,7 @@ async function renderEventAccounts(c: AppContext, filters: NostrFilter[], opts?:
async function renderAccounts(c: AppContext, pubkeys: string[]) {
const { offset, limit } = listPaginationSchema.parse(c.req.query());
const authors = pubkeys.slice(offset, offset + limit);
const authors = pubkeys.reverse().slice(offset, offset + limit);
const store = await Storages.db();
const signal = c.req.raw.signal;