Skip to content

Conversation

@calebbourg
Copy link
Collaborator

@calebbourg calebbourg commented Apr 4, 2025

Description

Adds endpoint for deleting existing coaching sessions.

The following applies:

  • Only users that are coaches for the coaching session are authorized to delete it
  • We attempt to delete the associated Tiptap document. If that fails we do not delete the coaching session

Changes

  • Adds `DELETE /coaching_sessions/{coaching_session_id}
  • Refactors domain::coaching_sessions

Testing Strategy

Tested locally against refactor-group/refactor-platform-fe#100

@calebbourg calebbourg added the feature work Specifically implementing a new feature label Apr 4, 2025
@calebbourg calebbourg added this to the 1.0-beta1 milestone Apr 4, 2025
@calebbourg calebbourg self-assigned this Apr 4, 2025
@calebbourg calebbourg marked this pull request as ready for review April 5, 2025 13:23
@calebbourg calebbourg requested a review from jhodapp April 5, 2025 13:23
@calebbourg calebbourg requested a review from zgavin1 April 5, 2025 13:27
Copy link
Member

@jhodapp jhodapp left a comment

Choose a reason for hiding this comment

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

Looks fantastic! One minor suggested change to make.

}

pub async fn create(&self, document_name: &str) -> Result<(), Error> {
let url = format!(
Copy link
Member

Choose a reason for hiding this comment

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

I suggest pulling this up to the top of this module since it's repeated for create and delete, which will also help centralize it in case TipTap ever changes their cloud API paths.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Great idea 3e0a566

@calebbourg calebbourg force-pushed the delete_coaching_sessions branch from 3e0a566 to 961d084 Compare April 9, 2025 13:59
@jhodapp jhodapp merged commit 4b18db2 into main Apr 9, 2025
4 checks passed
@jhodapp jhodapp deleted the delete_coaching_sessions branch April 9, 2025 14:12
@github-project-automation github-project-automation bot moved this from Review to ✅ Done in Refactor Coaching Platform Apr 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature work Specifically implementing a new feature

Projects

Status: ✅ Done

Development

Successfully merging this pull request may close these issues.

3 participants