Make delete use self
This commit is contained in:
parent
8e8556ee53
commit
84505829c4
|
@ -53,14 +53,14 @@ impl Channel {
|
||||||
///
|
///
|
||||||
/// An `Option` that contains an `InstanceServerError` if an error occurred during the request, or `None` if the request was successful.
|
/// An `Option` that contains an `InstanceServerError` if an error occurred during the request, or `None` if the request was successful.
|
||||||
pub async fn delete(
|
pub async fn delete(
|
||||||
|
self,
|
||||||
token: &str,
|
token: &str,
|
||||||
url_api: &str,
|
url_api: &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.to_string()))
|
.delete(format!("{}/channels/{}/", url_api, self.id.to_string()))
|
||||||
.bearer_auth(token);
|
.bearer_auth(token);
|
||||||
match LimitedRequester::new()
|
match LimitedRequester::new()
|
||||||
.await
|
.await
|
||||||
|
|
Loading…
Reference in New Issue