From 647ec8f71592be10cdd981027c6adefa0e9f3cf1 Mon Sep 17 00:00:00 2001 From: Aravinth Manivannan Date: Thu, 29 Dec 2022 01:38:48 +0530 Subject: [PATCH] feat: load dashboard api key --- config/default.toml | 3 +++ src/settings.rs | 6 ++++++ 2 files changed, 9 insertions(+) diff --git a/config/default.toml b/config/default.toml index b14e905..9297d50 100644 --- a/config/default.toml +++ b/config/default.toml @@ -17,6 +17,9 @@ domain = "localhost" proxy_has_tls = false #url_prefix = "" +[dash] +api_key = "somereallycomplicatedBatmanpassword" + [database] # This section deals with the database location and how to access it # Please note that at the moment, we have support for only postgresqa. diff --git a/src/settings.rs b/src/settings.rs index a6b4ec1..be239e6 100644 --- a/src/settings.rs +++ b/src/settings.rs @@ -24,6 +24,11 @@ use serde::Deserialize; use serde::Serialize; use url::Url; +#[derive(Debug, Clone, Deserialize)] +pub struct Dashboard { + pub api_key: String, +} + #[derive(Debug, Clone, Deserialize)] pub struct Server { pub port: u32, @@ -72,6 +77,7 @@ pub struct Settings { pub database: Database, pub server: Server, pub source_code: String, + pub dash: Dashboard, } #[cfg(not(tarpaulin_include))]