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

Local variable name shadows variable in outer scope JS-0123
Bug risk
Minor
2 occurrences in this check
'client' is already declared in the upper scope on line 3 column 8
 93
 94    static async validate(req, res){
 95
 96        const client = await this.findById(req) 97        const clientKey = await Validator.createAuthToken({id: client.id, name: client.name}, process.env.CLIENT_TOKEN_KEY)
 98
 99        if(res.cookie != null && Validator.verify(res.cookie, clientKey).id == client.id){  //Duda, porque se usa el res y no el req?
'client' is already declared in the upper scope on line 3 column 8
 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