From e819cf850afda36495e39b4811fe3de770370fdd Mon Sep 17 00:00:00 2001 From: Aravinth Manivannan Date: Thu, 29 Dec 2022 16:40:06 +0530 Subject: [PATCH] feat: load form api settings --- config/default.toml | 4 ++++ src/settings.rs | 7 +++++++ 2 files changed, 11 insertions(+) diff --git a/config/default.toml b/config/default.toml index 06ca361..485b75a 100644 --- a/config/default.toml +++ b/config/default.toml @@ -38,3 +38,7 @@ password = "password" name = "postgres" pool = 4 database_type="postgres" # "postgres" + +[form] +api_key = "longrandomlygeneratedpassword" +url = "http://localhost:6000" diff --git a/src/settings.rs b/src/settings.rs index 33db9f8..77c3968 100644 --- a/src/settings.rs +++ b/src/settings.rs @@ -83,6 +83,7 @@ pub struct Settings { pub database: Database, pub page: PageConfig, pub conductors: Vec, + pub form: Forms, } #[derive(Debug, Clone, Serialize, Deserialize)] @@ -92,6 +93,12 @@ pub struct Conductor { pub url: Url, } +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct Forms { + pub api_key: String, + pub url: Url, +} + #[derive(Debug, Clone, Serialize, Deserialize)] pub struct PageConfig { pub base_path: String,