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 @@ ...@@ -4,9 +4,9 @@
"port": 5444, "port": 5444,
"username": "postgres", "username": "postgres",
"password": "mysecretpassword", "password": "mysecretpassword",
"database": "test", "database": "test2",
"entities": ["src/**/*.entity{.ts,.js}"], "entities": ["src/**/*.entity{.ts,.js}"],
"synchronize": true, "synchronize": true,
"logging": true, "logging": true,
"dropSchema": false "dropSchema": true
} }
...@@ -43,8 +43,8 @@ export class DrawController { ...@@ -43,8 +43,8 @@ export class DrawController {
return this.drawService.drawMap(id, data); return this.drawService.drawMap(id, data);
} }
@Put('location') // @Put('location')
@UseGuards(new AuthGuard()) // @UseGuards(new AuthGuard())
@UsePipes(new ValidationPipe()) // @UsePipes(new ValidationPipe())
async trackLocation() {} // async trackLocation() {}
} }
...@@ -85,6 +85,11 @@ export class GameController { ...@@ -85,6 +85,11 @@ export class GameController {
return this.gameservice.listGames(); return this.gameservice.listGames();
} }
@Get('get-faction-members/:id')
async getFactionMembers(@Param('id') factionId) {
return this.gameservice.listFactionMembers(factionId);
}
@Get(':id') @Get(':id')
async returnGameInfo(@Param('id') id: string) { async returnGameInfo(@Param('id') id: string) {
return this.gameservice.returnGameInfo(id); return this.gameservice.returnGameInfo(id);
......
...@@ -199,6 +199,14 @@ export class GameService { ...@@ -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 // returns information about a game identified by id
async returnGameInfo(id: string) { async returnGameInfo(id: string) {
const game = await this.gameRepository.findOne({ 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