renderAccounts: reverse the list of pubkeys
This commit is contained in:
parent
b7943669b2
commit
2ff929ca95
|
@ -16,7 +16,7 @@ const mutesController: AppController = async (c) => {
|
||||||
|
|
||||||
if (event10000) {
|
if (event10000) {
|
||||||
const pubkeys = getTagSet(event10000.tags, 'p');
|
const pubkeys = getTagSet(event10000.tags, 'p');
|
||||||
return renderAccounts(c, [...pubkeys].reverse());
|
return renderAccounts(c, [...pubkeys]);
|
||||||
} else {
|
} else {
|
||||||
return c.json([]);
|
return c.json([]);
|
||||||
}
|
}
|
||||||
|
|
|
@ -44,7 +44,7 @@ async function renderEventAccounts(c: AppContext, filters: NostrFilter[], opts?:
|
||||||
|
|
||||||
async function renderAccounts(c: AppContext, pubkeys: string[]) {
|
async function renderAccounts(c: AppContext, pubkeys: string[]) {
|
||||||
const { offset, limit } = listPaginationSchema.parse(c.req.query());
|
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 store = await Storages.db();
|
||||||
const signal = c.req.raw.signal;
|
const signal = c.req.raw.signal;
|
||||||
|
|
Loading…
Reference in New Issue