Make channel delete take ownership of a Channel

This commit is contained in:
bitfl0wer 2023-05-28 22:39:38 +02:00
parent 268da9525c
commit 69b6efe200
No known key found for this signature in database
GPG Key ID: 84BBB60DF895ABF2
1 changed files with 2 additions and 2 deletions

View File

@ -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