diff --git a/src/ruminuwuity/admin/get_suspended.rs b/src/ruminuwuity/admin/get_suspended.rs deleted file mode 100644 index efdea5a7b..000000000 --- a/src/ruminuwuity/admin/get_suspended.rs +++ /dev/null @@ -1,53 +0,0 @@ -//! `GET /_matrix/client/v1/admin/suspend/{userId}` -//! -//! Check the suspension status of a target user - -pub mod v1 { - //! `/_matrix/client/unstable/uk.timedout.msc4323/admin/suspend/{userID}` - //! ([msc]) - //! - //! [msc]: https://github.com/matrix-org/matrix-spec-proposals/pull/4323 - - use ruma::{ - OwnedUserId, - api::{auth_scheme::AccessToken, request, response}, - metadata, - }; - - metadata! { - method: GET, - rate_limited: false, - authentication: AccessToken, - history: { - unstable => "/_matrix/client/unstable/uk.timedout.msc4323/admin/suspend/{user_id}", - 1.18 => "/_matrix/client/v1/admin/suspend/{user_id}", - } - } - - /// Request type for the get & set user suspension status endpoint. - #[request(error = ruma::api::error::Error)] - pub struct Request { - /// The user to look up. - #[ruma_api(path)] - pub user_id: OwnedUserId, - } - - /// Response type for the suspension endpoints - #[response(error = ruma::api::error::Error)] - pub struct Response { - /// Whether the user is currently suspended. - pub suspended: bool, - } - - impl Request { - /// Creates a new `Request` with the given user id. - #[must_use] - pub fn new(user_id: OwnedUserId) -> Self { Self { user_id } } - } - - impl Response { - /// Creates a new `Response` with the given suspension status. - #[must_use] - pub fn new(suspended: bool) -> Self { Self { suspended } } - } -} diff --git a/src/ruminuwuity/admin/mod.rs b/src/ruminuwuity/admin/mod.rs index 991abc208..030c60629 100644 --- a/src/ruminuwuity/admin/mod.rs +++ b/src/ruminuwuity/admin/mod.rs @@ -1,3 +1 @@ pub mod continuwuity; -pub mod get_suspended; -pub mod set_suspended; diff --git a/src/ruminuwuity/admin/set_suspended.rs b/src/ruminuwuity/admin/set_suspended.rs deleted file mode 100644 index 1df92e3c0..000000000 --- a/src/ruminuwuity/admin/set_suspended.rs +++ /dev/null @@ -1,55 +0,0 @@ -//! `PUT /_matrix/client/v1/admin/suspend/{userId}` -//! -//! Set the suspension status of a target user - -pub mod v1 { - //! `/_matrix/client/unstable/uk.timedout.msc4323/admin/suspend/{userID}` - //! ([msc]) - //! - //! [msc]: https://github.com/matrix-org/matrix-spec-proposals/pull/4323 - - use ruma::{ - OwnedUserId, - api::{auth_scheme::AccessToken, request, response}, - metadata, - }; - - metadata! { - method: PUT, - rate_limited: false, - authentication: AccessToken, - history: { - unstable => "/_matrix/client/unstable/uk.timedout.msc4323/admin/suspend/{user_id}", - 1.18 => "/_matrix/client/v1/admin/suspend/{user_id}", - } - } - - /// Request type for the set user suspension status endpoint. - #[request(error = ruma::api::error::Error)] - pub struct Request { - /// The user to look up. - #[ruma_api(path)] - pub user_id: OwnedUserId, - - pub suspended: bool, - } - - /// Response type for the suspension endpoints - #[response(error = ruma::api::error::Error)] - pub struct Response { - /// Whether the user is currently suspended. - pub suspended: bool, - } - - impl Request { - /// Creates a new `Request` with the given user id. - #[must_use] - pub fn new(user_id: OwnedUserId, suspended: bool) -> Self { Self { user_id, suspended } } - } - - impl Response { - /// Creates a new `Response` with the given suspension status. - #[must_use] - pub fn new(suspended: bool) -> Self { Self { suspended } } - } -}