DBURL name change #7

Merged
phoenix merged 3 commits from dburl_change into devel 2025-06-01 01:26:38 +00:00
2 changed files with 3 additions and 3 deletions
Showing only changes of commit 188b9d79fb - Show all commits

View File

@@ -1,7 +1,7 @@
pub async fn get_db_url() -> String { pub async fn get_db_url() -> String {
dotenvy::dotenv().ok(); dotenvy::dotenv().ok();
std::env::var(crate::keys::DBURL).expect(crate::keys::error::ERROR) std::env::var(crate::keys::DB_URL).expect(crate::keys::error::DB_URL)
} }
pub async fn get_secret_main_key() -> String { pub async fn get_secret_main_key() -> String {

View File

@@ -1,6 +1,6 @@
// TODO: Change this to snake case // TODO: Change this to snake case
// Environment key for Database management // Environment key for Database management
pub const DBURL: &str = "DATABASE_URL"; pub const DB_URL: &str = "DATABASE_URL";
// Environment key for secret main key // Environment key for secret main key
// Used for the icarus app // Used for the icarus app
@@ -14,7 +14,7 @@ pub const SECRET_KEY: &str = "SECRET_KEY";
pub const ROOT_DIRECTORY: &str = "ROOT_DIRECTORY"; pub const ROOT_DIRECTORY: &str = "ROOT_DIRECTORY";
pub mod error { pub mod error {
pub const ERROR: &str = "DATABASE_URL must be set in .env"; pub const DB_URL: &str = "DATABASE_URL must be set in .env";
pub const SECRET_KEY: &str = "SECRET_KEY must be set in environment file"; pub const SECRET_KEY: &str = "SECRET_KEY must be set in environment file";
pub const SECRET_MAIN_KEY: &str = "SECRET_MAIN_KEY must not be set in environment file"; pub const SECRET_MAIN_KEY: &str = "SECRET_MAIN_KEY must not be set in environment file";
pub const ROOT_DIRECTORY: &str = "ROOT_DIRECTORY must not be set in environment file"; pub const ROOT_DIRECTORY: &str = "ROOT_DIRECTORY must not be set in environment file";