You've already forked AstralRinth
forked from didirus/AstralRinth
R2 impl (#466)
* Add Cloudflare R2 impl * Bump actix version * Fix sec issues
This commit is contained in:
@@ -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())
|
||||
}
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user