addChild作成

This commit is contained in:
ろむねこ 2024-06-18 19:00:50 +09:00
parent caf7d66bda
commit fb9310c4c0
Signed by: Fujimatsu
GPG Key ID: FA1F39A1BA37D168

View File

@ -9,5 +9,12 @@ async function getChilds(homeGroupId: string): Promise<Child[]> {
}).then((children) => { return children; });
}
async function addChild(childName: string): Promise<Child> {
const child: Child = {} as Child;
child.name = childName;
return prisma.child.create({
data: child
}).then((child) => { return child; });
}
export { getChilds };
export { getChilds, addChild };