fixed result sorting
This commit is contained in:
@@ -98,7 +98,11 @@ export const fetchAllLocations = withUser(async (user:AuthenticatedUser, pageIx:
|
||||
// fetch `pageSize` locations for the given page index
|
||||
const locations = await dbClient.collection<BillingLocation>("lokacije")
|
||||
.find({ userId })
|
||||
.sort({ yearMonth: -1, name: 1 })
|
||||
.sort({
|
||||
"yearMonth.year": -1,
|
||||
"yearMonth.month": -1,
|
||||
name: 1,
|
||||
})
|
||||
.skip(pageIx * pageSize)
|
||||
.limit(pageSize)
|
||||
.toArray();
|
||||
|
||||
Reference in New Issue
Block a user