51 router/tasks optimize adres request

parent 93bfd127
...@@ -37,7 +37,7 @@ router.post('/', async(req:Request, res:Response):Promise<Response>=>{ ...@@ -37,7 +37,7 @@ router.post('/', async(req:Request, res:Response):Promise<Response>=>{
return res.send({newTask}) return res.send({newTask})
}) })
router.get('/userId/:userId', async (req: Request, res: Response):Promise<Response>=>{ router.get('/:userId', async (req: Request, res: Response):Promise<Response>=>{
const userId = req.params.userId; const userId = req.params.userId;
const tasks = await dataSource const tasks = await dataSource
.getRepository(Task) .getRepository(Task)
......
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