Format project

This commit is contained in:
Kurt Hutten
2021-08-22 12:26:06 +10:00
parent b0647171d8
commit aa43a848a1

View File

@@ -103,13 +103,15 @@ export const updateProject = async ({ id, input }: UpdateProjectArgs) => {
const descriptionChange = const descriptionChange =
input.description && input.description !== oldProject.description input.description && input.description !== oldProject.description
if (titleChange || descriptionChange) { if (titleChange || descriptionChange) {
const socialCard = await db.socialCard.findUnique({where: {projectId}}) const socialCard = await db.socialCard.findUnique({
if (socialCard) { where: { projectId },
return db.socialCard.update({ })
data: { outOfDate: true }, if (socialCard) {
where: { id: socialCard.id }, return db.socialCard.update({
}) data: { outOfDate: true },
} where: { id: socialCard.id },
})
}
} }
} }
requireAuth() requireAuth()