Make channel delete take ownership of a Channel
This commit is contained in:
parent
ed330859bd
commit
a189d2baaa
|
@ -42,12 +42,12 @@ impl Channel {
|
||||||
pub async fn delete(
|
pub async fn delete(
|
||||||
token: &str,
|
token: &str,
|
||||||
url_api: &str,
|
url_api: &str,
|
||||||
channel_id: &str,
|
channel: Channel,
|
||||||
limits_user: &mut Limits,
|
limits_user: &mut Limits,
|
||||||
limits_instance: &mut Limits,
|
limits_instance: &mut Limits,
|
||||||
) -> Option<InstanceServerError> {
|
) -> Option<InstanceServerError> {
|
||||||
let request = Client::new()
|
let request = Client::new()
|
||||||
.delete(format!("{}/channels/{}/", url_api, channel_id))
|
.delete(format!("{}/channels/{}/", url_api, channel.id.to_string()))
|
||||||
.bearer_auth(token);
|
.bearer_auth(token);
|
||||||
match LimitedRequester::new()
|
match LimitedRequester::new()
|
||||||
.await
|
.await
|
||||||
|
|
Loading…
Reference in New Issue