Fix feedback @moufmouf strategy of maps managing by back.
This commit is contained in:
parent
68ac145882
commit
58b65030bd
11 changed files with 35 additions and 33 deletions
|
@ -1,7 +1,7 @@
|
|||
import {Application, Request, Response} from "express";
|
||||
import Jwt from "jsonwebtoken";
|
||||
import {BAD_REQUEST, OK} from "http-status-codes";
|
||||
import {SECRET_KEY, ROOM_STARTED, URL_ROOM_STARTED} from "../Enum/EnvironmentVariable"; //TODO fix import by "_Enum/..."
|
||||
import {SECRET_KEY, URL_ROOM_STARTED} from "../Enum/EnvironmentVariable"; //TODO fix import by "_Enum/..."
|
||||
import { uuid } from 'uuidv4';
|
||||
|
||||
export class AuthenticateController{
|
||||
|
@ -26,7 +26,7 @@ export class AuthenticateController{
|
|||
let token = Jwt.sign({email: param.email, userId: userId}, SECRET_KEY, {expiresIn: '24h'});
|
||||
return res.status(OK).send({
|
||||
token: token,
|
||||
startedRoom: {key: ROOM_STARTED, url: URL_ROOM_STARTED},
|
||||
mapUrlStart: URL_ROOM_STARTED,
|
||||
userId: userId,
|
||||
});
|
||||
});
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import express from "express";
|
||||
import {Application, Request, Response} from "express";
|
||||
import {OK} from "http-status-codes";
|
||||
import {ROOM_STARTED, ROOMS, URL_ROOM_STARTED} from "../Enum/EnvironmentVariable";
|
||||
import {URL_ROOM_STARTED} from "../Enum/EnvironmentVariable";
|
||||
|
||||
export class MapController {
|
||||
App: Application;
|
||||
|
@ -20,8 +20,7 @@ export class MapController {
|
|||
getMaps() {
|
||||
this.App.get("/maps", (req: Request, res: Response) => {
|
||||
return res.status(OK).send({
|
||||
mapStart: {key: ROOM_STARTED, url: URL_ROOM_STARTED},
|
||||
maps: ROOMS
|
||||
mapUrlStart: URL_ROOM_STARTED
|
||||
});
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue