game systems: game system pages, game system create

components: moved DevTool to client component
This commit is contained in:
2024-03-19 11:20:15 -06:00
parent 50e5ff0663
commit 56f0442d33
10 changed files with 200 additions and 21 deletions

View File

@@ -0,0 +1,15 @@
"use server";
import { prisma } from "@/prisma/prismaClient";
export const createGameSystem = async (name: string) => {
const { id } = await prisma.gameSystem.create({
data: {
name,
},
select: {
id: true,
},
});
return id;
};

View File

@@ -0,0 +1,7 @@
"use server";
import { prisma } from "@/prisma/prismaClient";
// DEV TOOL ONLY
export async function deleteAllGameSystems() {
await prisma.gameSystem.deleteMany();
}