schema: some schema editor fixes

This commit is contained in:
2024-06-11 05:09:14 -06:00
parent e6880af3ee
commit 1664d3bc7f
8 changed files with 68 additions and 85 deletions

20
actions/Schemas/find.ts Normal file
View File

@@ -0,0 +1,20 @@
"use server";
import { prisma } from "@/prisma/prismaClient";
export const findSchema = async (id: string) => {
const schema = await prisma.schema.findFirst({
where: {
id,
},
include: {
gameSystem: {
select: {
id: true,
name: true,
},
},
},
});
return schema;
};