#89 fixing inputs on delete copytasks

parent acc32f52
......@@ -63,15 +63,16 @@ router.put("/change-copy", authAuthorOrExecutorOfTask, async(req:Request, res: R
})
/**delete copyTask by dateTimeTaskId */
router.delete('/:id', authAuthorOrExecutorOfTask, async(req:Request, res:Response):Promise<Response>=>{
const {id} = req.params
router.delete('/:dateTimeTaskId', async(req:Request, res:Response):Promise<Response>=>{
// router.delete('/:dateTimeTaskId', authAuthorOrExecutorOfTask, async(req:Request, res:Response):Promise<Response>=>{
const {dateTimeTaskId} = req.params
await myDataSource
.createQueryBuilder()
.delete()
.from(DateTimeTask)
.where("id = :id", { id })
.where("id = :dateTimeTaskId", { dateTimeTaskId })
.execute()
return res.send({message:"delete succesfully"})
return res.send({message:"copyTask delete succesfully"})
}
)
......
......@@ -54,16 +54,12 @@ const TableRowTask= ({
const exp = roudHourUp(moment.utc(dateIso)).format("HH:"+"00")
return exp;
}
const getDayOfWeek = (dateIso) => {
const date = moment.utc(dateIso);
return weekDays[date.day()];
}
// const handleEditDateTimeTask =(dateTimeTask)=>{
// console.log('edit handleEditDateTimeTask')
// }
return (
<>
<TableRow hover key={task.id}>
......
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