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

listFactionMembers sorts alphabetically

parent 4309300b
No related branches found
No related tags found
3 merge requests!59Development to master,!31Development,!28Group fix
...@@ -118,10 +118,13 @@ export class FactionService { ...@@ -118,10 +118,13 @@ export class FactionService {
} }
async listFactionMembers(faction) { async listFactionMembers(faction) {
return await this.game_PersonRepository.find({ const members = await this.game_PersonRepository.find({
where: { faction }, where: { faction },
relations: ['person'], relations: ['person'],
order: { person: 'DESC' },
}); });
members.sort(function(a, b) {
return a['person']['name'].localeCompare(b['person']['name']);
});
return members;
} }
} }
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