#69 added description in routers/users

parent ad861ff7
...@@ -64,7 +64,7 @@ router.post('/', upload.single("avatar"), async (req : Request, res : Response): ...@@ -64,7 +64,7 @@ router.post('/', upload.single("avatar"), async (req : Request, res : Response):
return res.send({userToFront}) return res.send({userToFront})
}) })
/** log in*/
router.post('/sessions/', async (req : Request, res : Response):Promise<object> => { router.post('/sessions/', async (req : Request, res : Response):Promise<object> => {
const {email, password} = req.body; const {email, password} = req.body;
const user = await dataSource const user = await dataSource
...@@ -89,7 +89,7 @@ router.post('/sessions/', async (req : Request, res : Response):Promise<object> ...@@ -89,7 +89,7 @@ router.post('/sessions/', async (req : Request, res : Response):Promise<object>
}) })
}) })
/** log out*/
router.delete('/sessions', async(req: Request, res: Response):Promise<void | object> => { router.delete('/sessions', async(req: Request, res: Response):Promise<void | object> => {
const token = req.get('Authorization'); const token = req.get('Authorization');
const successMsg = {message:'success'}; const successMsg = {message:'success'};
......
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