You've already forked AstralRinth
forked from didirus/AstralRinth
Staff support dashboard routes (#3160)
* Staff support dashboard routes * Fix clippy
This commit is contained in:
@@ -985,7 +985,7 @@ pub async fn upload_file(
|
||||
|
||||
let client = reqwest::Client::new();
|
||||
let delphi_url = dotenvy::var("DELPHI_URL")?;
|
||||
let res = client
|
||||
match client
|
||||
.post(delphi_url)
|
||||
.json(&serde_json::json!({
|
||||
"url": url,
|
||||
@@ -993,10 +993,16 @@ pub async fn upload_file(
|
||||
"version_id": version_id,
|
||||
}))
|
||||
.send()
|
||||
.await?;
|
||||
|
||||
if !res.status().is_success() {
|
||||
error!("Failed to upload file to Delphi: {url}");
|
||||
.await
|
||||
{
|
||||
Ok(res) => {
|
||||
if !res.status().is_success() {
|
||||
error!("Failed to upload file to Delphi: {url}");
|
||||
}
|
||||
}
|
||||
Err(e) => {
|
||||
error!("Failed to upload file to Delphi: {url}: {e}");
|
||||
}
|
||||
}
|
||||
|
||||
version_files.push(VersionFileBuilder {
|
||||
|
||||
Reference in New Issue
Block a user