Skip to content
Snippets Groups Projects
Commit c4db19ba authored by Samuli Virtapohja's avatar Samuli Virtapohja
Browse files

changes

parent 0f66478a
No related branches found
No related tags found
3 merge requests!59Development to master,!31Development,!26Piirto2
......@@ -4,9 +4,9 @@
"port": 5444,
"username": "postgres",
"password": "mysecretpassword",
"database": "test",
"database": "test2",
"entities": ["src/**/*.entity{.ts,.js}"],
"synchronize": true,
"logging": true,
"dropSchema": false
"dropSchema": true
}
......@@ -43,8 +43,8 @@ export class DrawController {
return this.drawService.drawMap(id, data);
}
@Put('location')
@UseGuards(new AuthGuard())
@UsePipes(new ValidationPipe())
async trackLocation() {}
// @Put('location')
// @UseGuards(new AuthGuard())
// @UsePipes(new ValidationPipe())
// async trackLocation() {}
}
......@@ -85,6 +85,11 @@ export class GameController {
return this.gameservice.listGames();
}
@Get('get-faction-members/:id')
async getFactionMembers(@Param('id') factionId) {
return this.gameservice.listFactionMembers(factionId);
}
@Get(':id')
async returnGameInfo(@Param('id') id: string) {
return this.gameservice.returnGameInfo(id);
......
......@@ -199,6 +199,14 @@ export class GameService {
});
}
async listFactionMembers(faction) {
return await this.game_PersonRepository.find({
where: { faction },
relations: ['person'],
order: { person: 'DESC' },
});
}
// returns information about a game identified by id
async returnGameInfo(id: string) {
const game = await this.gameRepository.findOne({
......
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