Skip to content

Commit

Permalink
fix(meals): sort menus by the most recent update time
Browse files Browse the repository at this point in the history
  • Loading branch information
czaja307 committed Jan 16, 2025
1 parent 8345413 commit c9d55bb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/controllers/meals_controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,9 @@ export default class MealsController {
const limit = request.input("limit", 10) as number;

const hashes = await HashesMeal.query()
.distinct("hashFk")
.distinct("hashFk", "updated_at")
.preload("websiteHash")
.orderBy("updatedAt", "desc")
.orderBy("updated_at", "desc")
.paginate(page, limit);

const meals = await Promise.all(
Expand Down

0 comments on commit c9d55bb

Please sign in to comment.