commit 0725b22564cab84463159e4461b8acfc2121776b parent c4133fce267d2ae40daf986233ac8dd4a7b9d41a Author: Antoine A <> Date: Wed, 30 Jul 2025 15:05:49 +0200 bitcoin: fix token config name Diffstat:
| M | common/taler-api/src/config.rs | | | 7 | ++++++- |
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/common/taler-api/src/config.rs b/common/taler-api/src/config.rs @@ -60,7 +60,12 @@ impl ApiCfg { )) }, "bearer" => { - Ok(AuthMethod::Bearer(sect.str("AUTH_TOKEN").require()?)) + let token = sect.str("AUTH_TOKEN").opt()?; + if let Some(token) = token { + Ok(AuthMethod::Bearer(token)) + } else { + Ok(AuthMethod::Bearer(sect.str("TOKEN").require()?)) + } } ) .require()?;