All checks were successful
continuous-integration/drone/push Build is passing
26 lines
707 B
Rust
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()))
|
|
}
|