Skip to content
Snippets Groups Projects
Commit e62d3fa8 authored by L4168's avatar L4168
Browse files

fixed undefined id bug

parent 151f8478
No related branches found
No related tags found
4 merge requests!59Development to master,!31Development,!25Dto service,!24Faction task edit
...@@ -32,9 +32,9 @@ export class RolesGuard implements CanActivate { ...@@ -32,9 +32,9 @@ export class RolesGuard implements CanActivate {
return false; return false;
} }
const gameId = request.params.id; const gameId = request.params.id;
const user = await this.getUserObject(request.headers.authorization); request.user = await this.getUserObject(request.headers.authorization);
const role = await this.game_PersonRepository.findOne({ const role = await this.game_PersonRepository.findOne({
person: user['id'], person: request.user['id'],
game: gameId, game: gameId,
}); });
// check that the role matches the criteria and that token is valid for this game // check that the role matches the criteria and that token is valid for this game
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment