diff --git a/database/src/db.rs b/database/src/db.rs index 60fabe17..e6f32e34 100644 --- a/database/src/db.rs +++ b/database/src/db.rs @@ -5,7 +5,6 @@ pub struct Db { } impl Db { - // CHECK THIS pub async fn connect_to_the_pool() -> Db { dotenvy::from_filename("infra/.env").unwrap(); diff --git a/server/src/cloud_state.rs b/server/src/cloud_state.rs index 7e119381..6ca57e50 100644 --- a/server/src/cloud_state.rs +++ b/server/src/cloud_state.rs @@ -31,7 +31,6 @@ pub struct CloudState { pub grafana_client_conf: Arc, } -// CHECK THIS impl CloudState { pub async fn new() -> Self { let sessions_cache = get_new_session(); diff --git a/server/src/env.rs b/server/src/env.rs index b87cbe7a..3568664f 100644 --- a/server/src/env.rs +++ b/server/src/env.rs @@ -16,7 +16,7 @@ pub struct ENV { pub GF_SECURITY_ADMIN_PASSWORD: String, pub MAILER_ACTIVE: bool, } -// CHECK THIS + pub fn get_env() -> &'static ENV { static INSTANCE: OnceCell = OnceCell::new(); diff --git a/server/src/http/cloud/grafana_utils/import_template_dashboard.rs b/server/src/http/cloud/grafana_utils/import_template_dashboard.rs index 06e4eb35..858cb038 100644 --- a/server/src/http/cloud/grafana_utils/import_template_dashboard.rs +++ b/server/src/http/cloud/grafana_utils/import_template_dashboard.rs @@ -14,7 +14,7 @@ use openapi::{ use serde_json::Value; use std::{env, sync::Arc}; use tokio::fs; -// CHECK THIS - used only at the begginning - better to have error + pub async fn setup_templates_dashboard( grafana_conf: &Arc, ) -> Result<(), (StatusCode, String)> { diff --git a/server/src/infra_env.rs b/server/src/infra_env.rs index abcf329b..27970b51 100644 --- a/server/src/infra_env.rs +++ b/server/src/infra_env.rs @@ -30,7 +30,6 @@ pub struct INFRA_ENV { pub OFELIA_EMAIL_TO: String, } -// CHECK THIS pub fn get_env() -> &'static INFRA_ENV { static INSTANCE: OnceCell = OnceCell::new(); diff --git a/server/src/mailer/mailer.rs b/server/src/mailer/mailer.rs index 524f464a..0f532776 100644 --- a/server/src/mailer/mailer.rs +++ b/server/src/mailer/mailer.rs @@ -10,7 +10,7 @@ pub struct Mailer { pub templates: Arc>, pub mailbox: Mailbox, } -// CHECK THIS + impl Mailer { pub async fn init(username: String, password: String) -> Self { let creds = Credentials::new(username.clone(), password); diff --git a/server/src/state.rs b/server/src/state.rs index 217eed69..349fff08 100644 --- a/server/src/state.rs +++ b/server/src/state.rs @@ -41,7 +41,6 @@ pub struct ServerState { pub cloud_state: Option>, } -// CHECK THIS impl FromRef for Arc { fn from_ref(state: &ServerState) -> Self { // Safe as middleware will prevent this from being None diff --git a/server/src/statics.rs b/server/src/statics.rs index 14951b7d..8c2952dc 100644 --- a/server/src/statics.rs +++ b/server/src/statics.rs @@ -10,7 +10,6 @@ pub const TEMPLATES_FOLDER_UID: &str = "TEMPLATE_FOLDER_UID"; pub const POSTGRES_DATASOURCE_UID: &str = "POSTGRES_DATASOURCE_UID"; // Name must be 3-30 characters long and include only alphanumeric characters, underscores, or slashes. -// CHECK THIS - all regex creation pub static NAME_REGEX: Lazy = Lazy::new(|| Regex::new(r"^[a-zA-Z0-9_-]{3,30}$").expect("Regex creation failed")); diff --git a/server/src/utils.rs b/server/src/utils.rs index 948f6e2e..cb963fe6 100644 --- a/server/src/utils.rs +++ b/server/src/utils.rs @@ -67,7 +67,6 @@ pub async fn start_transaction( } } -// CHECK THIS - used only at the begginning - better to have error pub async fn import_template_dashboards(grafana_client: &Arc) { // Check if folder exists if not create it setup_templates_folder(&grafana_client).await.unwrap();