From be5ec2d60e5a32b360fd2719538e022f11742c79 Mon Sep 17 00:00:00 2001 From: Augustin Gjini Date: Thu, 6 Jun 2024 20:22:19 +0200 Subject: [PATCH] fix(app): set recurrence to undefined --- app/src/screens/communities/CommunitiesChatScreen.tsx | 3 +-- back/src/Liane/Liane.Service/Internal/Trip/TripServiceImpl.cs | 2 +- common/src/api.ts | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/app/src/screens/communities/CommunitiesChatScreen.tsx b/app/src/screens/communities/CommunitiesChatScreen.tsx index 7dfa719e..8ae4499a 100644 --- a/app/src/screens/communities/CommunitiesChatScreen.tsx +++ b/app/src/screens/communities/CommunitiesChatScreen.tsx @@ -226,8 +226,7 @@ export const CommunitiesChatScreen = () => { from: me!.lianeRequest.wayPoints[0].id!, to: me!.lianeRequest.wayPoints[1].id!, availableSeats: me!.lianeRequest.canDrive ? 1 : -1, - geolocationLevel: geolocationLevel || "None", - recurrence: "0000000" + geolocationLevel: geolocationLevel || "None" }); const goMessage = await services.community.sendMessage(liane!.id!, { type: "Trip", diff --git a/back/src/Liane/Liane.Service/Internal/Trip/TripServiceImpl.cs b/back/src/Liane/Liane.Service/Internal/Trip/TripServiceImpl.cs index 8e0ae462..68118156 100644 --- a/back/src/Liane/Liane.Service/Internal/Trip/TripServiceImpl.cs +++ b/back/src/Liane/Liane.Service/Internal/Trip/TripServiceImpl.cs @@ -54,7 +54,7 @@ public sealed class TripServiceImpl( { var createdBy = owner ?? currentContext.CurrentUser().Id; var createdAt = DateTime.UtcNow; - if (entity.Recurrence is null) + if (entity.Recurrence is null || entity.Recurrence.Value.IsEmpty()) { return await CreateWithReturn(entity, createdBy, createdAt, null); } diff --git a/common/src/api.ts b/common/src/api.ts index ce08296d..c09d0a46 100644 --- a/common/src/api.ts +++ b/common/src/api.ts @@ -99,7 +99,7 @@ export type LianeRequest = Identity & availableSeats: number; from: Ref; to: Ref; - recurrence: DayOfWeekFlag | null; + recurrence?: DayOfWeekFlag; geolocationLevel: GeolocationLevel; // shareWith: Ref[]; }>;