Fix axum route conflicts

This commit is contained in:
Jonas Platte 2022-01-22 14:45:12 +01:00
parent a5757ab195
commit 7bf538f549
No known key found for this signature in database
GPG key ID: 7D261D771D915378

View file

@ -253,10 +253,15 @@ fn routes() -> Router {
.ruma_route(client_server::get_protocols_route) .ruma_route(client_server::get_protocols_route)
.ruma_route(client_server::send_message_event_route) .ruma_route(client_server::send_message_event_route)
.ruma_route(client_server::send_state_event_for_key_route) .ruma_route(client_server::send_state_event_for_key_route)
.ruma_route(client_server::send_state_event_for_empty_key_route)
.ruma_route(client_server::get_state_events_route) .ruma_route(client_server::get_state_events_route)
.ruma_route(client_server::get_state_events_for_key_route) .ruma_route(client_server::get_state_events_for_key_route)
.ruma_route(client_server::get_state_events_for_empty_key_route) // Ruma doesn't have support for multiple paths for a single endpoint yet, and these routes
// share one Ruma request / response type pair with {get,send}_state_event_for_key_route
.route(
"/_matrix/client/r0/rooms/:room_id/state/:event_type",
get(client_server::get_state_events_for_empty_key_route)
.put(client_server::send_state_event_for_empty_key_route),
)
.ruma_route(client_server::sync_events_route) .ruma_route(client_server::sync_events_route)
.ruma_route(client_server::get_context_route) .ruma_route(client_server::get_context_route)
.ruma_route(client_server::get_message_events_route) .ruma_route(client_server::get_message_events_route)