feat: add update_v2 route for events which allows resetting fields#378
Merged
GuillaumeDecMeetsMore merged 6 commits intomasterfrom Aug 18, 2025
Merged
Conversation
| /** | ||
| * Request body for updating an event | ||
| */ | ||
| export type UpdateEventRequestBodyV2 = { |
Collaborator
Author
There was a problem hiding this comment.
Added a V2 body with a new V2 endpoint, but the end goal is to delete the V1 and make the V2 replace the old endpoint
Comment on lines
+19
to
+21
| originalStartTime: event.originalStartTime | ||
| ? new Date(event.originalStartTime) | ||
| : event.originalStartTime, |
Collaborator
Author
There was a problem hiding this comment.
Fix missing conversion to Date
| } | ||
|
|
||
| #[async_trait::async_trait] | ||
| impl Subscriber<UpdateEventUseCaseV2> for SyncRemindersOnEventUpdated { |
Collaborator
Author
There was a problem hiding this comment.
This is just copy/pasted from above, so that it works with V2 too. I haven't tried to centralize as it will soon totally replace the V1
| } | ||
|
|
||
| #[async_trait::async_trait] | ||
| impl Subscriber<UpdateEventUseCaseV2> for UpdateSyncedEventsOnEventUpdated { |
Collaborator
Author
There was a problem hiding this comment.
Same, copy/pasted
mm-derek
reviewed
Aug 18, 2025
mm-derek
approved these changes
Aug 18, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changed
update_event_v2endpoint that "more correctly" updates event by allowing to reset fields tonullexternal_idorrecurrenceOption<String>has only 2 possible valuesOption<Option<String>>, which allows to have the 3 possible states correctly (don't update, update to NULL, update to new values)undefined, passingnull, or passing a valueoriginal_start_timenot converted to Date in JS