feat: accept conductor configuration

This commit is contained in:
Aravinth Manivannan 2022-12-15 00:59:35 +05:30
parent 5c0f6fd84d
commit 59b619f6fd
Signed by: realaravinth
GPG Key ID: AD9F0F08E855ED88
2 changed files with 11 additions and 1 deletions

View File

@ -3,6 +3,9 @@ allow_registration = true
# source code of your copy of pages server.
source_code = "https://github.com/realaravinth/pages"
support_email = "support@librepages.example.org"
conductors = [
{ username = "librepages_api", api_key = "longrandomlygeneratedpassword", url = "http://localhost:5000"}
]
[server]
# The port at which you want Pages to listen to
@ -16,7 +19,6 @@ workers = 2
domain = "localhost"
cookie_secret = "94b2b2732626fdb7736229a7c777cb451e6304c147c4549f30"
[page]
base_path = "/tmp/librepages-defualt-config/"
base_domain = "librepages.test" # domain where customer pages will be deployed.

View File

@ -82,6 +82,14 @@ pub struct Settings {
pub source_code: String,
pub database: Database,
pub page: PageConfig,
pub conductors: Vec<Conductor>,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct Conductor {
pub username: String,
pub api_key: String,
pub url: Url,
}
#[derive(Debug, Clone, Serialize, Deserialize)]