fix: end date update date error

This commit is contained in:
Julian Krauser 2025-01-13 10:38:44 +01:00
parent a2cc408e85
commit c9b8c3090d

View file

@ -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")