Skip to content

Commit

Permalink
sort events
Browse files Browse the repository at this point in the history
  • Loading branch information
nimarion committed Jan 16, 2024
1 parent 7da943c commit 63e83c0
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion backend/src/events/events.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,11 @@ export class EventsService {

findAll() {
return this.prisma.event
.findMany()
.findMany({
orderBy: {
date: 'desc',
},
})
.then((events) => events.map((event) => new Event(event)));
}

Expand Down

0 comments on commit 63e83c0

Please sign in to comment.