Skip to content

Conversation

@jhodapp
Copy link
Member

@jhodapp jhodapp commented Apr 7, 2025

Description

This PR refactors the backend endpoint for logout and changes it to be deletion of a user_session with an id.

GitHub Issue: None

Changes

  • Refactors the backend API to match what the frontend already correctly expects for logout --> delete /user_sessions/:id

Testing Strategy

  1. Use this frontend PR to test by logging in and then logging out with the UI

Concerns

None

… expects for logout --> delete /user_sessions/:id
@jhodapp jhodapp added the enhancement Improves existing functionality or feature label Apr 7, 2025
@jhodapp jhodapp added this to the 1.0-beta1 milestone Apr 7, 2025
@jhodapp jhodapp requested a review from calebbourg April 7, 2025 21:57
@jhodapp jhodapp self-assigned this Apr 7, 2025
pub async fn logout(mut auth_session: AuthSession) -> impl IntoResponse {
debug!("UserSessionController::logout()");
pub async fn delete(mut auth_session: AuthSession) -> impl IntoResponse {
trace!("UserSessionController::delete()");
Copy link
Collaborator

Choose a reason for hiding this comment

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

curious on the choice to use trace! over debug ?

Copy link
Member Author

Choose a reason for hiding this comment

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

I was thinking that function call console output is kind of the definition of trace and perhaps we are ready to start migrating the rest over to use trace as well?

@jhodapp jhodapp merged commit ac68e4b into main Apr 8, 2025
4 checks passed
@jhodapp jhodapp deleted the delete_user_sessions branch April 8, 2025 17:47
@github-project-automation github-project-automation bot moved this from Review to ✅ Done in Refactor Coaching Platform Apr 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement Improves existing functionality or feature

Projects

Status: ✅ Done

Development

Successfully merging this pull request may close these issues.

3 participants