add RumaError to Error; encapsulate RumaResponse in api
Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
parent
7ba0777bd3
commit
a43c78e55f
5 changed files with 45 additions and 35 deletions
|
@ -9,8 +9,7 @@ extern crate conduit_service as service;
|
|||
pub(crate) use conduit::{debug_info, debug_warn, utils, Error, Result};
|
||||
pub(crate) use service::{pdu::PduEvent, services, user_is_local};
|
||||
|
||||
pub(crate) use self::router::Ruma;
|
||||
pub use self::router::RumaResponse;
|
||||
pub(crate) use self::router::{Ruma, RumaResponse};
|
||||
|
||||
conduit::mod_ctor! {}
|
||||
conduit::mod_dtor! {}
|
||||
|
|
|
@ -13,9 +13,8 @@ use ruma::{
|
|||
CanonicalJsonValue, OwnedDeviceId, OwnedServerName, OwnedUserId, UserId,
|
||||
};
|
||||
|
||||
pub(super) use self::handler::RouterExt;
|
||||
pub use self::response::RumaResponse;
|
||||
use self::{auth::Auth, request::Request};
|
||||
pub(super) use self::{handler::RouterExt, response::RumaResponse};
|
||||
use crate::{service::appservice::RegistrationInfo, services, Error, Result};
|
||||
|
||||
/// Extractor for Ruma request structs
|
||||
|
|
|
@ -5,8 +5,7 @@ use http::StatusCode;
|
|||
use http_body_util::Full;
|
||||
use ruma::api::{client::uiaa::UiaaResponse, OutgoingResponse};
|
||||
|
||||
#[derive(Clone)]
|
||||
pub struct RumaResponse<T>(pub T);
|
||||
pub(crate) struct RumaResponse<T>(pub(crate) T);
|
||||
|
||||
impl From<Error> for RumaResponse<UiaaResponse> {
|
||||
fn from(t: Error) -> Self { Self(t.into()) }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue