use std::{collections::BTreeMap, sync::Arc}; use axum::{routing::get, Extension}; use crate::{ api::client_server::errors::api_error::ApiError, models::users::User, ruma_wrapper::{RumaRequest, RumaResponse}, }; use ruma::api::client::thirdparty; pub fn routes() -> axum::Router { axum::Router::new() .route("/r0/thirdparty/protocols", get(get_thirdparty_protocols)) .layer(axum::middleware::from_fn(super::authentication_middleware)) } #[tracing::instrument(skip_all)] async fn get_thirdparty_protocols( Extension(_user): Extension>, ) -> Result, ApiError> { Ok(RumaResponse(thirdparty::get_protocols::v3::Response::new( BTreeMap::new(), ))) }