From 2512e66ecd8178076c0225c3ccbbc626829b9570 Mon Sep 17 00:00:00 2001 From: y9kap Date: Tue, 31 Oct 2023 13:42:04 +0300 Subject: [PATCH] fix(#76-support-search): restore edit --- .../ktor/requests/meetings/MeetingsEngine.kt | 20 +++++++++---------- .../sdk/engine/requests/EditMeetingRequest.kt | 2 +- .../meetings/AuthorizedMeetingRepository.kt | 4 ++-- .../sdk/meetings/AuthorizedMeetingsApi.kt | 4 ++-- .../meetacy/sdk/meetings/MeetingRepository.kt | 4 ++-- .../app/meetacy/sdk/meetings/MeetingsApi.kt | 4 ++-- 6 files changed, 19 insertions(+), 19 deletions(-) diff --git a/api/api-ktor/src/commonMain/kotlin/app/meetacy/sdk/engine/ktor/requests/meetings/MeetingsEngine.kt b/api/api-ktor/src/commonMain/kotlin/app/meetacy/sdk/engine/ktor/requests/meetings/MeetingsEngine.kt index 2d7733e1..96a15163 100644 --- a/api/api-ktor/src/commonMain/kotlin/app/meetacy/sdk/engine/ktor/requests/meetings/MeetingsEngine.kt +++ b/api/api-ktor/src/commonMain/kotlin/app/meetacy/sdk/engine/ktor/requests/meetings/MeetingsEngine.kt @@ -171,22 +171,22 @@ internal class MeetingsEngine( @Serializable private data class EditMeetingBody( val meetingId: MeetingIdSerializable, - val title: String?, - val description: String?, - val location: LocationSerializable?, - val date: DateSerializable?, + val title: OptionalSerializable, + val description: OptionalSerializable, + val location: OptionalSerializable, + val date: OptionalSerializable, val avatarId: OptionalSerializable = OptionalSerializable.Undefined, - val visibility: MeetingSerializable.Visibility? + val visibility: OptionalSerializable ) private fun EditMeetingRequest.toBody() = EditMeetingBody( meetingId.serializable(), - title, - description, - location?.serializable(), - date?.serializable(), + title.serializable(), + description.serializable(), + location.map { it.serializable() }.serializable(), + date.map { it.serializable() }.serializable(), avatarId.map { it?.serializable() }.serializable(), - visibility?.serializable() + visibility.map { it.serializable() }.serializable(), ) suspend fun editMeeting(request: EditMeetingRequest): EditMeetingRequest.Response = with(request) { diff --git a/api/src/commonMain/kotlin/app/meetacy/sdk/engine/requests/EditMeetingRequest.kt b/api/src/commonMain/kotlin/app/meetacy/sdk/engine/requests/EditMeetingRequest.kt index 7bf66f50..229e07ba 100644 --- a/api/src/commonMain/kotlin/app/meetacy/sdk/engine/requests/EditMeetingRequest.kt +++ b/api/src/commonMain/kotlin/app/meetacy/sdk/engine/requests/EditMeetingRequest.kt @@ -12,7 +12,7 @@ public data class EditMeetingRequest( public val token: Token, public val meetingId: MeetingId, public val title: Optional, - public val description: Optional, + public val description: Optional, public val location: Optional, public val date: Optional, public val avatarId: Optional, diff --git a/api/src/commonMain/kotlin/app/meetacy/sdk/meetings/AuthorizedMeetingRepository.kt b/api/src/commonMain/kotlin/app/meetacy/sdk/meetings/AuthorizedMeetingRepository.kt index 456c330b..1a6b70d8 100644 --- a/api/src/commonMain/kotlin/app/meetacy/sdk/meetings/AuthorizedMeetingRepository.kt +++ b/api/src/commonMain/kotlin/app/meetacy/sdk/meetings/AuthorizedMeetingRepository.kt @@ -36,7 +36,7 @@ public class AuthorizedMeetingRepository( title: String, date: Date, location: Location, - description: String?, + description: String, avatarId: FileId?, visibility: Meeting.Visibility ): AuthorizedMeetingRepository = edited( @@ -52,7 +52,7 @@ public class AuthorizedMeetingRepository( title: Optional = Optional.Undefined, date: Optional = Optional.Undefined, location: Optional = Optional.Undefined, - description: Optional = Optional.Undefined, + description: Optional = Optional.Undefined, avatarId: Optional = Optional.Undefined, visibility: Optional = Optional.Undefined ): AuthorizedMeetingRepository { diff --git a/api/src/commonMain/kotlin/app/meetacy/sdk/meetings/AuthorizedMeetingsApi.kt b/api/src/commonMain/kotlin/app/meetacy/sdk/meetings/AuthorizedMeetingsApi.kt index 5c37365c..e38611cd 100644 --- a/api/src/commonMain/kotlin/app/meetacy/sdk/meetings/AuthorizedMeetingsApi.kt +++ b/api/src/commonMain/kotlin/app/meetacy/sdk/meetings/AuthorizedMeetingsApi.kt @@ -50,7 +50,7 @@ public class AuthorizedMeetingsApi( title: String, date: Date, location: Location, - description: String?, + description: String, avatarId: FileId?, visibility: Meeting.Visibility ): AuthorizedMeetingRepository = edit( @@ -68,7 +68,7 @@ public class AuthorizedMeetingsApi( title: Optional = Optional.Undefined, date: Optional = Optional.Undefined, location: Optional = Optional.Undefined, - description: Optional = Optional.Undefined, + description: Optional = Optional.Undefined, avatarId: Optional = Optional.Undefined, visibility: Optional = Optional.Undefined ): AuthorizedMeetingRepository { diff --git a/api/src/commonMain/kotlin/app/meetacy/sdk/meetings/MeetingRepository.kt b/api/src/commonMain/kotlin/app/meetacy/sdk/meetings/MeetingRepository.kt index 338aef6c..840dd8c0 100644 --- a/api/src/commonMain/kotlin/app/meetacy/sdk/meetings/MeetingRepository.kt +++ b/api/src/commonMain/kotlin/app/meetacy/sdk/meetings/MeetingRepository.kt @@ -39,7 +39,7 @@ public class MeetingRepository( title: String, date: Date, location: Location, - description: String?, + description: String, avatarId: FileId?, visibility: Meeting.Visibility ): MeetingRepository = edited( @@ -57,7 +57,7 @@ public class MeetingRepository( title: Optional = Optional.Undefined, date: Optional = Optional.Undefined, location: Optional = Optional.Undefined, - description: Optional = Optional.Undefined, + description: Optional = Optional.Undefined, avatarId: Optional = Optional.Undefined, visibility: Optional = Optional.Undefined ): MeetingRepository { diff --git a/api/src/commonMain/kotlin/app/meetacy/sdk/meetings/MeetingsApi.kt b/api/src/commonMain/kotlin/app/meetacy/sdk/meetings/MeetingsApi.kt index d7506c61..7ce912aa 100644 --- a/api/src/commonMain/kotlin/app/meetacy/sdk/meetings/MeetingsApi.kt +++ b/api/src/commonMain/kotlin/app/meetacy/sdk/meetings/MeetingsApi.kt @@ -56,7 +56,7 @@ public class MeetingsApi(private val api: MeetacyApi) { title: String, date: Date, location: Location, - description: String?, + description: String, avatarId: FileId?, visibility: Meeting.Visibility ): MeetingRepository = edit( @@ -76,7 +76,7 @@ public class MeetingsApi(private val api: MeetacyApi) { title: Optional = Optional.Undefined, date: Optional = Optional.Undefined, location: Optional = Optional.Undefined, - description: Optional = Optional.Undefined, + description: Optional = Optional.Undefined, avatarId: Optional = Optional.Undefined, visibility: Optional = Optional.Undefined ): MeetingRepository {