client-api: Update leave_room to new API conventions
This commit is contained in:
parent
abeb2160ad
commit
dffa60d70f
@ -16,10 +16,24 @@ ruma_api! {
|
||||
request: {
|
||||
/// The room to leave.
|
||||
#[ruma_api(path)]
|
||||
pub room_id: RoomId,
|
||||
pub room_id: &'a RoomId,
|
||||
}
|
||||
|
||||
response: {}
|
||||
|
||||
error: crate::Error
|
||||
}
|
||||
|
||||
impl<'a> Request<'a> {
|
||||
/// Creates a new `Request` with the given room id.
|
||||
pub fn new(room_id: &'a RoomId) -> Self {
|
||||
Self { room_id }
|
||||
}
|
||||
}
|
||||
|
||||
impl Response {
|
||||
/// Creates an empty `Response`.
|
||||
pub fn new() -> Self {
|
||||
Self
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user