Skip to content

Commit

Permalink
filter future shows from theme page. Fixes #1266
Browse files Browse the repository at this point in the history
  • Loading branch information
wesbos committed Oct 24, 2023
1 parent 5729439 commit 0a755f5
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/routes/(site)/system/theme/+page.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@ export const load: PageServerLoad = async ({ locals, setHeaders }) => {
'cache-control': 'max-age=240'
});
return {
show: locals.prisma.show.findFirst({ orderBy: { number: 'desc' } })
show: locals.prisma.show.findFirst({
where: {
date: {
lte: new Date()
}
},
orderBy: { number: 'desc' }
})
};
};

0 comments on commit 0a755f5

Please sign in to comment.