mirror of
https://github.com/docmost/docmost.git
synced 2026-05-07 14:43:06 +08:00
lists sorting
This commit is contained in:
@@ -135,10 +135,12 @@ export class GroupRepo {
|
||||
direction: 'desc',
|
||||
key: 'memberCount',
|
||||
},
|
||||
{ expression: 'sub.name', direction: 'asc', key: 'name' },
|
||||
{ expression: 'sub.id', direction: 'asc', key: 'id' },
|
||||
],
|
||||
parseCursor: (cursor) => ({
|
||||
memberCount: parseInt(cursor.memberCount, 10),
|
||||
name: cursor.name,
|
||||
id: cursor.id,
|
||||
}),
|
||||
});
|
||||
|
||||
@@ -304,8 +304,11 @@ export class SpaceMemberRepo {
|
||||
perPage: pagination.limit,
|
||||
cursor: pagination.cursor,
|
||||
beforeCursor: pagination.beforeCursor,
|
||||
fields: [{ expression: 'id', direction: 'asc' }],
|
||||
parseCursor: (cursor) => ({ id: cursor.id }),
|
||||
fields: [
|
||||
{ expression: 'name', direction: 'asc' },
|
||||
{ expression: 'id', direction: 'asc' },
|
||||
],
|
||||
parseCursor: (cursor) => ({ name: cursor.name, id: cursor.id }),
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -152,8 +152,11 @@ export class SpaceRepo {
|
||||
perPage: pagination.limit,
|
||||
cursor: pagination.cursor,
|
||||
beforeCursor: pagination.beforeCursor,
|
||||
fields: [{ expression: 'id', direction: 'asc' }],
|
||||
parseCursor: (cursor) => ({ id: cursor.id }),
|
||||
fields: [
|
||||
{ expression: 'name', direction: 'asc' },
|
||||
{ expression: 'id', direction: 'asc' },
|
||||
],
|
||||
parseCursor: (cursor) => ({ name: cursor.name, id: cursor.id }),
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -165,8 +165,11 @@ export class UserRepo {
|
||||
perPage: pagination.limit,
|
||||
cursor: pagination.cursor,
|
||||
beforeCursor: pagination.beforeCursor,
|
||||
fields: [{ expression: 'id', direction: 'asc' }],
|
||||
parseCursor: (cursor) => ({ id: cursor.id }),
|
||||
fields: [
|
||||
{ expression: 'name', direction: 'asc' },
|
||||
{ expression: 'id', direction: 'asc' },
|
||||
],
|
||||
parseCursor: (cursor) => ({ name: cursor.name, id: cursor.id }),
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user