play walkout songs

This commit is contained in:
yohlo
2025-09-22 17:57:29 -05:00
parent ae934e77f4
commit b93ce38d48
12 changed files with 152 additions and 42 deletions

View File

@@ -32,9 +32,10 @@ export const updateTournament = createServerFn()
export const getTournament = createServerFn()
.validator(z.string())
.middleware([superTokensFunctionMiddleware])
.handler(async ({ data: tournamentId }) =>
toServerResult(() => pbAdmin.getTournament(tournamentId))
);
.handler(async ({ data: tournamentId, context }) => {
const isAdmin = context.roles.includes("Admin");
return toServerResult(() => pbAdmin.getTournament(tournamentId, isAdmin));
});
export const getCurrentTournament = createServerFn()
.middleware([superTokensFunctionMiddleware])