Patrick Michl 6ed7b16bf6
All checks were successful
continuous-integration/drone/push Build is passing
implement default for routes required to work to get element to switch screens
2022-07-03 22:43:50 +02:00

26 lines
707 B
Rust

use std::sync::Arc;
use axum::routing::post;
use axum::Extension;
use crate::api::client_server::errors::api_error::ApiError;
use crate::models::users::User;
use crate::ruma_wrapper::{RumaRequest, RumaResponse};
use ruma::api::client::keys;
pub fn routes() -> axum::Router {
axum::Router::new()
.route("/r0/keys/query", post(get_keys))
.layer(axum::middleware::from_fn(super::authentication_middleware))
}
async fn get_keys(
Extension(_user): Extension<Arc<User>>,
RumaRequest(_req): RumaRequest<keys::get_keys::v3::IncomingRequest>,
) -> Result<RumaResponse<keys::get_keys::v3::Response>, ApiError> {
use keys::get_keys::v3::*;
Ok(RumaResponse(Response::new()))
}