Turning let into const where applicable
This commit is contained in:
parent
30ca47c2d8
commit
ac0b7a7361
5 changed files with 54 additions and 54 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue