game systems: game system pages, game system create
components: moved DevTool to client component
This commit is contained in:
15
actions/GameSystems/create.ts
Normal file
15
actions/GameSystems/create.ts
Normal 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;
|
||||
};
|
7
actions/GameSystems/deleteAll.ts
Normal file
7
actions/GameSystems/deleteAll.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
"use server";
|
||||
import { prisma } from "@/prisma/prismaClient";
|
||||
|
||||
// DEV TOOL ONLY
|
||||
export async function deleteAllGameSystems() {
|
||||
await prisma.gameSystem.deleteMany();
|
||||
}
|
Reference in New Issue
Block a user