* Add Cloudflare R2 impl

* Bump actix version

* Fix sec issues
This commit is contained in:
Geometrically
2022-10-22 21:23:31 -07:00
committed by GitHub
parent 07edb998e4
commit 6e72be54cb
18 changed files with 265 additions and 181 deletions

View File

@@ -1,10 +1,10 @@
use std::str::FromStr;
pub fn parse_var<T: FromStr>(var: &'static str) -> Option<T> {
dotenv::var(var).ok().and_then(|i| i.parse().ok())
dotenvy::var(var).ok().and_then(|i| i.parse().ok())
}
pub fn parse_strings_from_var(var: &'static str) -> Option<Vec<String>> {
dotenv::var(var)
dotenvy::var(var)
.ok()
.and_then(|s| serde_json::from_str::<Vec<String>>(&s).ok())
}

View File

@@ -76,7 +76,7 @@ pub async fn send_discord_webhook(
let embed = DiscordEmbed {
url: format!(
"{}/{}/{}",
dotenv::var("SITE_URL").unwrap_or_default(),
dotenvy::var("SITE_URL").unwrap_or_default(),
project.project_type,
project
.clone()