Teleport notification

- Create end point to permit the teleport notification. The map url will be /teleport/token_user
- Create message teleport
- Create receive feature in phaser to teleport

TODO
Teleport player on black room.
This commit is contained in:
Gregoire Parant 2020-10-13 11:39:07 +02:00
parent 3c2f134e4e
commit 65406f844e
8 changed files with 96 additions and 19 deletions

View file

@ -1,4 +1,5 @@
import {HttpResponse} from "uWebSockets.js";
import {HttpRequest, HttpResponse} from "uWebSockets.js";
import {ADMIN_API_TOKEN} from "../Enum/EnvironmentVariable";
export class BaseController {
@ -7,4 +8,11 @@ export class BaseController {
res.writeHeader('access-control-allow-methods', 'GET, POST, OPTIONS, PUT, PATCH, DELETE');
res.writeHeader('access-control-allow-origin', '*');
}
protected checkAdminToken(req: HttpRequest): void {
//TODO
/*if(req.getHeader('Authorization') !== ADMIN_API_TOKEN){
throw 'Error token api';
}*/
}
}