Turning let into const where applicable

This commit is contained in:
David Négrier 2020-06-09 15:54:54 +02:00
parent 30ca47c2d8
commit ac0b7a7361
5 changed files with 54 additions and 54 deletions

View file

@ -16,15 +16,15 @@ export class AuthenticateController {
login(){
// For now, let's completely forget the /login route.
this.App.post("/login", (req: Request, res: Response) => {
let param = req.body;
const param = req.body;
/*if(!param.name){
return res.status(BAD_REQUEST).send({
message: "email parameter is empty"
});
}*/
//TODO check user email for The Coding Machine game
let userId = uuid();
let token = Jwt.sign({name: param.name, userId: userId}, SECRET_KEY, {expiresIn: '24h'});
const userId = uuid();
const token = Jwt.sign({name: param.name, userId: userId}, SECRET_KEY, {expiresIn: '24h'});
return res.status(OK).send({
token: token,
mapUrlStart: URL_ROOM_STARTED,