Skip to content
Snippets Groups Projects
Commit bacc12fc authored by Ronnie Friman's avatar Ronnie Friman
Browse files

trackingdata returns username

parent 1ea88b9f
No related branches found
No related tags found
3 merge requests!59Development to master,!58Development to testing,!56Cluster update to Development
...@@ -70,7 +70,7 @@ export class TrackingService { ...@@ -70,7 +70,7 @@ export class TrackingService {
playerdata.push( playerdata.push(
await this.trackingrepository.find({ await this.trackingrepository.find({
where: { faction: gameperson.faction }, where: { faction: gameperson.faction },
relations: ['faction', 'gamepersonId'], relations: ['faction', 'gamepersonId', 'gamepersonId.person'],
}), }),
); );
} else { } else {
...@@ -79,7 +79,7 @@ export class TrackingService { ...@@ -79,7 +79,7 @@ export class TrackingService {
factions.map(async faction => { factions.map(async faction => {
let rawdata = await this.trackingrepository.find({ let rawdata = await this.trackingrepository.find({
where: { faction: faction.factionId }, where: { faction: faction.factionId },
relations: ['faction', 'gamepersonId'], relations: ['faction', 'gamepersonId', 'gamepersonId.person'],
}); });
let groups = { let groups = {
'infantry.svg': [], 'infantry.svg': [],
...@@ -105,6 +105,7 @@ export class TrackingService { ...@@ -105,6 +105,7 @@ export class TrackingService {
await Promise.all( await Promise.all(
faction[group].map(async player => { faction[group].map(async player => {
return await { return await {
username: player['gamepersonId']['person']['name'],
gamepersonId: player['gamepersonId']['gamepersonId'], gamepersonId: player['gamepersonId']['gamepersonId'],
gamepersonRole: player['gamepersonId']['role'], gamepersonRole: player['gamepersonId']['role'],
factionId: player['faction']['factionId'], factionId: player['faction']['factionId'],
......
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