diff --git a/src/service/club/member/memberService.ts b/src/service/club/member/memberService.ts index 4ac3a6d..969cbb9 100644 --- a/src/service/club/member/memberService.ts +++ b/src/service/club/member/memberService.ts @@ -120,17 +120,20 @@ export default abstract class MemberService { */ static async getByRunningMembership(): Promise> { return await dataSource - .getRepository(member) - .createQueryBuilder("member") - .leftJoinAndSelect("member.memberships", "membership") - .where("membership.end IS NULL") - .getMany() - .then((res) => { - return res; - }) - .catch((err) => { - throw new InternalException("member not found by id", err); - }); + .getRepository(member) + .createQueryBuilder("member") + .leftJoinAndSelect("member.memberships", "membership") + .where("membership.end IS NULL") + .orderBy("member.lastname") + .addOrderBy("member.firstname") + .addOrderBy("member.nameaffix") + .getMany() + .then((res) => { + return res; + }) + .catch((err) => { + throw new InternalException("member not found by id", err); + }); } /**