Skip to content

Commit

Permalink
hotfix: dont cache team
Browse files Browse the repository at this point in the history
  • Loading branch information
jonassimoen committed Jun 7, 2024
1 parent 8d3c605 commit 33faf6b
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions src/controllers/Team.ts
Original file line number Diff line number Diff line change
Expand Up @@ -167,10 +167,6 @@ export const DeleteDropTeamHandler = async (req: any, rep: any) => {
export const GetTeamHandler = async (req: any, rep: any) => {
const weekId = await upcomingWeekId();
const teamWithSelections = await prisma.team.findUnique({
cacheStrategy: {
ttl: 30,
swr: 60,
},
where: {
id: +req.params.id,
},
Expand Down Expand Up @@ -199,6 +195,9 @@ export const GetTeamHandler = async (req: any, rep: any) => {
},
where: {
weekId,
},
orderBy: {
order: 'asc'
}
},
Transfer: {
Expand Down Expand Up @@ -233,10 +232,6 @@ export const GetPointsTeamHandler = async (req: any, rep: any) => {
globalData
]: [any, any, any, any] = await Promise.all([
prisma.team.findUnique({
cacheStrategy: {
ttl: 30,
swr: 60,
},
where: {
id: +req.params.id,
},
Expand Down Expand Up @@ -307,6 +302,9 @@ export const GetPointsTeamHandler = async (req: any, rep: any) => {
},
where: {
weekId: +req.params.weekId,
},
orderBy: {
order: 'asc'
}
}
}
Expand Down

0 comments on commit 33faf6b

Please sign in to comment.