Made missing KV_URL env error more obvious
This commit is contained in:
@@ -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"));
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user