Olimpiadas-INET-2024-Escuela-Tecnica-21 / fase1_backend

Variable used before definition JS-0129
Bug risk
Major
2 occurrences in this check
'client' was used before it was defined
 57    static async login(req, res){
 58
 59        //const client = await Validator.createAuthToken({id: 123,nombre:"ezequiel"}, "123")
 60        const client = await Validator.createAuthToken({id: client.id, name: client.name}, process.env.CLIENT_TOKEN_KEY) 61        return res.json(client)
 62
 63
'client' was used before it was defined
 57    static async login(req, res){
 58
 59        //const client = await Validator.createAuthToken({id: 123,nombre:"ezequiel"}, "123")
 60        const client = await Validator.createAuthToken({id: client.id, name: client.name}, process.env.CLIENT_TOKEN_KEY) 61        return res.json(client)
 62
 63