mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
change sort, add lastAnnouncedAt and createdAt by DESC
This commit is contained in:
parent
a1b8be4329
commit
bc4af26667
@ -11,7 +11,11 @@ export class CommunityResolver {
|
||||
@Query(() => [Community])
|
||||
async getCommunities(): Promise<Community[]> {
|
||||
const dbCommunities: DbCommunity[] = await DbCommunity.find({
|
||||
order: { foreign: 'ASC', publicKey: 'ASC', apiVersion: 'ASC' },
|
||||
order: {
|
||||
foreign: 'ASC',
|
||||
createdAt: 'DESC',
|
||||
lastAnnouncedAt: 'DESC',
|
||||
},
|
||||
})
|
||||
return dbCommunities.map((dbCom: DbCommunity) => new Community(dbCom))
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user