Port from Rocket to axum
This commit is contained in:
parent
8709c3ae7b
commit
1f7b3fa4ac
52 changed files with 1064 additions and 1885 deletions
|
@ -62,23 +62,6 @@ pub use unversioned::*;
|
|||
pub use user_directory::*;
|
||||
pub use voip::*;
|
||||
|
||||
#[cfg(not(feature = "conduit_bin"))]
|
||||
use super::State;
|
||||
#[cfg(feature = "conduit_bin")]
|
||||
use {
|
||||
crate::ConduitResult, rocket::options, ruma::api::client::r0::to_device::send_event_to_device,
|
||||
};
|
||||
|
||||
pub const DEVICE_ID_LENGTH: usize = 10;
|
||||
pub const TOKEN_LENGTH: usize = 256;
|
||||
pub const SESSION_ID_LENGTH: usize = 256;
|
||||
|
||||
/// # `OPTIONS`
|
||||
///
|
||||
/// Web clients use this to get CORS headers.
|
||||
#[cfg(feature = "conduit_bin")]
|
||||
#[options("/<_..>")]
|
||||
#[tracing::instrument]
|
||||
pub async fn options_route() -> ConduitResult<send_event_to_device::Response> {
|
||||
Ok(send_event_to_device::Response {}.into())
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue