refactor: put endpoints into modules

This commit is contained in:
timokoesters 2020-07-30 18:14:47 +02:00
parent 485a24398b
commit c1c62b7eb4
No known key found for this signature in database
GPG key ID: 24DA7517711A2BA4
33 changed files with 4153 additions and 3848 deletions

View file

@ -0,0 +1,19 @@
use crate::ConduitResult;
use ruma::api::client::unversioned::get_supported_versions;
use std::collections::BTreeMap;
#[cfg(feature = "conduit_bin")]
use rocket::get;
#[cfg_attr(feature = "conduit_bin", get("/_matrix/client/versions"))]
pub fn get_supported_versions_route() -> ConduitResult<get_supported_versions::Response> {
let mut unstable_features = BTreeMap::new();
unstable_features.insert("org.matrix.e2e_cross_signing".to_owned(), true);
Ok(get_supported_versions::Response {
versions: vec!["r0.5.0".to_owned(), "r0.6.0".to_owned()],
unstable_features,
}
.into())
}