feat: show collection's favorité links first

This commit is contained in:
Sonny
2025-08-21 01:58:39 +02:00
parent 11df24128f
commit ac0605caf5

View File

@@ -26,7 +26,7 @@ export class CollectionService {
return await Collection.query() return await Collection.query()
.where('author_id', context.auth.user!.id) .where('author_id', context.auth.user!.id)
.orderBy('created_at') .orderBy('created_at')
.preload('links'); .preload('links', (q) => q.orderBy('favorite', 'desc'));
} }
async getTotalCollectionsCount() { async getTotalCollectionsCount() {