const {Router}=require(‘express’)
const {
createUser,
authUser,
findUserByToken
}=require(’…/…/controllers/users’)
const route =Router()
route.get(’/’,async(req,res)=>{
let auth=req.headers[‘authorization’]
if(auth.startsWith(‘Token’)){
let token=auth.split(’’)[1]
let user=await findUserByToken(token)
return res.send(user)
}
//based on the token i can find the user
else{
res.status(401).send(
“errors”,{
“body”: [
“Authorization token empty”
]
}
)
}
})
module.exports={route}
i am getting this error
"errors":{
^^^^^^^^
SyntaxError: missing ) after argument list