schema: some schema editor fixes
This commit is contained in:
20
actions/Schemas/find.ts
Normal file
20
actions/Schemas/find.ts
Normal 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;
|
||||
};
|
Reference in New Issue
Block a user