project forms
This commit is contained in:
@@ -61,10 +61,15 @@ export const ProjectRouter = router({
|
||||
)
|
||||
}
|
||||
const { input } = opts;
|
||||
return await db.update(project)
|
||||
const updateProj = await db.update(project)
|
||||
.set(input.update)
|
||||
.returning()
|
||||
.where(eq(project.id,input.by.id))
|
||||
.where(eq(project.id,input.by.id));
|
||||
if (updateProj[0] !== undefined) {
|
||||
return updateProj[0]
|
||||
} else {
|
||||
return null
|
||||
}
|
||||
}),
|
||||
stack: StackRouter,
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user