From c9b8c3090d0addca459b0d3d49fb5b499c02ddba Mon Sep 17 00:00:00 2001 From: Julian Krauser Date: Mon, 13 Jan 2025 10:38:44 +0100 Subject: [PATCH] fix: end date update date error --- src/command/club/member/membershipCommandHandler.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/command/club/member/membershipCommandHandler.ts b/src/command/club/member/membershipCommandHandler.ts index 602d6d7..0cd0e5a 100644 --- a/src/command/club/member/membershipCommandHandler.ts +++ b/src/command/club/member/membershipCommandHandler.ts @@ -31,7 +31,7 @@ export default abstract class MembershipCommandHandler { .createQueryBuilder() .update(membership) .set({ - end: new Date(createMembership.start).setDate(new Date(createMembership.start).getDate() - 1), + end: new Date(new Date(createMembership.start).setDate(new Date(createMembership.start).getDate() - 1)), terminationReason: "beendet durch neuen Eintrag.", }) .where("end IS NULL")