Merge branch 'task-free-number-enhance/delete_copy' into 'development'

copyTask delete router added

See merge request !53
parents a09aa306 67271500
......@@ -62,4 +62,17 @@ router.put("change-copy", authAuthorOrExecutorOfTask, async(req:Request, res: Re
return res.send({message :"Something wrong in make-copy router"})
})
/**delete copyTask by dateTimeTaskId */
router.delete('/:id', authAuthorOrExecutorOfTask, async(req:Request, res:Response):Promise<Response>=>{
const {id} = req.params
await myDataSource
.createQueryBuilder()
.delete()
.from(DateTimeTask)
.where("id = :id", { id })
.execute()
return res.send({message:"delete succesfully"})
}
)
export default router;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment