Skip to content

feat: add update_v2 route for events which allows resetting fields#378

Merged
GuillaumeDecMeetsMore merged 6 commits intomasterfrom
guillaume/feat/add-update-v2-allow-resetting-fields
Aug 18, 2025
Merged

feat: add update_v2 route for events which allows resetting fields#378
GuillaumeDecMeetsMore merged 6 commits intomasterfrom
guillaume/feat/add-update-v2-allow-resetting-fields

Conversation

@GuillaumeDecMeetsMore
Copy link
Collaborator

@GuillaumeDecMeetsMore GuillaumeDecMeetsMore commented Aug 18, 2025

Changed

  • Added an update_event_v2 endpoint that "more correctly" updates event by allowing to reset fields to null
  • Fix original_start_time not converted to Date in JS
  • Add integration tests
  • Fix some lint warnings

@GuillaumeDecMeetsMore GuillaumeDecMeetsMore self-assigned this Aug 18, 2025
/**
* Request body for updating an event
*/
export type UpdateEventRequestBodyV2 = {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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,
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix missing conversion to Date

}

#[async_trait::async_trait]
impl Subscriber<UpdateEventUseCaseV2> for SyncRemindersOnEventUpdated {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same, copy/pasted

@GuillaumeDecMeetsMore GuillaumeDecMeetsMore marked this pull request as ready for review August 18, 2025 04:16
@GuillaumeDecMeetsMore GuillaumeDecMeetsMore merged commit 4e12fc6 into master Aug 18, 2025
4 checks passed
@GuillaumeDecMeetsMore GuillaumeDecMeetsMore deleted the guillaume/feat/add-update-v2-allow-resetting-fields branch August 18, 2025 07:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants