Style part page

This commit is contained in:
Kurt Hutten
2020-11-07 16:38:48 +11:00
parent 606cf8eae8
commit 1bdc836b66
18 changed files with 347 additions and 61 deletions

View File

@@ -11,6 +11,21 @@ export const part = ({ id }) => {
where: { id },
})
}
export const partByUserAndTitle = async ({ userName, partTitle }) => {
const user = await db.user.findOne({
where: {
userName
}
})
return db.part.findOne({
where: {
title_userId: {
title: partTitle,
userId: user.id,
}
},
})
}
export const createPart = async ({ input }) => {
return db.part.create({