Made missing KV_URL env error more obvious

This commit is contained in:
DaXcess
2024-09-27 16:15:29 +02:00
parent 41d75a956c
commit 58df939280
4 changed files with 11 additions and 3 deletions
+4
View File
@@ -15,3 +15,7 @@ pub static SPOTIFY_CLIENT_SECRET: LazyLock<String> = LazyLock::new(|| {
std::env::var("SPOTIFY_CLIENT_SECRET")
.expect("missing SPOTIFY_CLIENT_SECRET environment variable")
});
// Locked behind `stats` feature
pub static KV_URL: LazyLock<String> =
LazyLock::new(|| std::env::var("KV_URL").expect("missing KV_URL environment variable"));
+4
View File
@@ -31,6 +31,10 @@ pub fn link_url() -> &'static str {
&env::LINK_URL
}
pub fn kv_url() -> &'static str {
&env::KV_URL
}
pub fn get_spotify(token: Token) -> AuthCodeSpotify {
AuthCodeSpotify::from_token_with_config(
token,