mirror of
https://github.com/r-ca/kidshift-be.git
synced 2024-10-26 00:24:02 +00:00
addChild作成
This commit is contained in:
parent
caf7d66bda
commit
fb9310c4c0
|
@ -9,5 +9,12 @@ async function getChilds(homeGroupId: string): Promise<Child[]> {
|
||||||
}).then((children) => { return children; });
|
}).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 };
|
||||||
|
|
Loading…
Reference in New Issue
Block a user