Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change logout to be a delete action #110

Merged
merged 1 commit into from
Mar 18, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions web/src/router.rs
Original file line number Diff line number Diff line change
@@ -120,7 +120,7 @@ pub fn define_routes(app_state: AppState) -> Router {
.merge(user_session_protected_routes())
.merge(coaching_sessions_routes(app_state.clone()))
.merge(jwt_routes(app_state.clone()))
// FIXME: protect the OpenAPI web UI
// **** FIXME: protect the OpenAPI web UI
.merge(RapiDoc::with_openapi("/api-docs/openapi2.json", ApiDoc::openapi()).path("/rapidoc"))
.fallback_service(static_routes())
}
@@ -302,7 +302,7 @@ pub fn user_routes(app_state: AppState) -> Router {
pub fn user_session_protected_routes() -> Router {
Router::new()
.route("/protected", get(user_session_controller::protected))
.route("/logout", get(user_session_controller::logout))
.route("/logout", delete(user_session_controller::logout))
.route_layer(login_required!(Backend, login_url = "/login"))
}