Add team creation, team join and debug login screen

This commit is contained in:
2025-08-03 18:58:17 +02:00
parent facb07de5b
commit 36e8ef41bf
15 changed files with 735 additions and 11 deletions
+34
View File
@@ -0,0 +1,34 @@
import { useValidatedParams, z, zh } from 'h3-zod';
import prisma from '~~/lib/prisma';
export default defineEventHandler(async (event) => {
const { huntId } = await useValidatedParams(
event,
z.object({
huntId: zh.numAsString
})
);
return prisma.huntTeam.findMany({
where: {
huntId
},
select: {
id: true,
name: true,
description: true,
owner: {
select: {
name: true
}
},
_count: {
select: {
members: true
}
}
},
orderBy: {
name: 'asc'
}
});
});