mirror of
https://github.com/Waradu/streamshare.git
synced 2025-04-20 19:34:09 +02:00
fixed delet function naming
This commit is contained in:
parent
04846fc51a
commit
15085a7a09
4 changed files with 5 additions and 5 deletions
2
Cargo.lock
generated
2
Cargo.lock
generated
|
@ -1084,7 +1084,7 @@ checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67"
|
|||
|
||||
[[package]]
|
||||
name = "streamshare"
|
||||
version = "1.1.0"
|
||||
version = "1.1.1"
|
||||
dependencies = [
|
||||
"futures",
|
||||
"reqwest",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
[package]
|
||||
name = "streamshare"
|
||||
version = "1.1.0"
|
||||
version = "1.1.1"
|
||||
edition = "2021"
|
||||
description = "Upload to streamshare library"
|
||||
license = "MIT"
|
||||
|
|
|
@ -22,7 +22,7 @@ match upload(&file_path).await {
|
|||
|
||||
Delete:
|
||||
```rust
|
||||
match streamshare::delete(identifier, deltoken).await {
|
||||
match streamshare::delete(file_identifier deletion_token).await {
|
||||
Ok(_) => println!("File deleted successfully"),
|
||||
Err(e) => eprintln!("Error deleting file: {}", e),
|
||||
}
|
||||
|
|
|
@ -90,11 +90,11 @@ pub async fn upload(file_path: &str) -> Result<(String, String), Box<dyn std::er
|
|||
))
|
||||
}
|
||||
|
||||
pub async fn delete(identifier: &str, deltoken: &str) -> Result<(), Box<dyn std::error::Error>> {
|
||||
pub async fn delete(file_identifier: &str, deletion_token: &str) -> Result<(), Box<dyn std::error::Error>> {
|
||||
let client = Client::new();
|
||||
let delete_url = format!(
|
||||
"https://streamshare.wireway.ch/api/delete/{}/{}",
|
||||
identifier, deltoken
|
||||
file_identifier, deletion_token
|
||||
);
|
||||
|
||||
let res = client.delete(&delete_url).send().await?;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue