Skip to content

Commit

Permalink
fix: sort clubs
Browse files Browse the repository at this point in the history
  • Loading branch information
jonassimoen committed Jun 10, 2024
1 parent 07b4736 commit e18b33f
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/controllers/Club.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,15 @@ import HttpError from "../utils/HttpError";
import axios from "axios";

export const GetClubsHandler = async (req: any, rep: any) => {
const clubs = await prisma.club.findMany({});
const clubs = await prisma.club.findMany({
cacheStrategy: {
ttl: 30,
swr: 60,
},
orderBy: {
name: 'desc'
}
});
rep.send(clubs);
}

Expand Down

0 comments on commit e18b33f

Please sign in to comment.