From 4b1daea3d63a6216f857d6649a697c3938038a2d Mon Sep 17 00:00:00 2001 From: Harsh Singh Date: Fri, 16 Feb 2024 17:31:04 +0530 Subject: [PATCH 1/2] minor fix: trim env_key when interpolating variables --- fastn-core/src/utils.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fastn-core/src/utils.rs b/fastn-core/src/utils.rs index 0e87f34abb..8689e4bb80 100644 --- a/fastn-core/src/utils.rs +++ b/fastn-core/src/utils.rs @@ -1089,7 +1089,7 @@ pub(crate) async fn interpolate_env_vars( let end = capture.end(); result.push_str(&endpoint[last_end..start]); - let key = captures.get(1).unwrap().as_str(); + let key = captures.get(1).unwrap().as_str().trim(); let value = match key { key if key.starts_with("env.") => { From e7893bc744f1ef98d010c730f04a444e940273b4 Mon Sep 17 00:00:00 2001 From: Arpita-Jaiswal Date: Fri, 16 Feb 2024 17:57:37 +0530 Subject: [PATCH 2/2] Made UserData clonable --- fastn-core/src/auth/ud.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fastn-core/src/auth/ud.rs b/fastn-core/src/auth/ud.rs index c823390052..453f8d8688 100644 --- a/fastn-core/src/auth/ud.rs +++ b/fastn-core/src/auth/ud.rs @@ -1,4 +1,4 @@ -#[derive(serde::Deserialize)] +#[derive(serde::Deserialize, Clone)] pub struct UserData { pub username: String, pub name: String,