settings: get first admin

This commit is contained in:
Philippe Loctaux 2023-05-03 21:47:00 +02:00
parent 0baeeadce9
commit 4bfc8a517f
4 changed files with 8 additions and 1 deletions

View file

@ -20,6 +20,7 @@ impl From<DatabaseSettings> for Settings {
.business_logo
.unwrap_or_else(|| DEFAULT_BUSINESS_LOGO.to_vec()),
url: db.url,
first_admin: db.first_admin,
}
}
}

View file

@ -14,6 +14,7 @@ pub struct Settings {
business_name: String,
business_logo: Vec<u8>,
url: Option<String>,
first_admin: Option<String>,
}
impl Settings {
@ -32,4 +33,7 @@ impl Settings {
pub fn updated_at(&self) -> DateTime<Utc> {
self.updated_at
}
pub fn first_admin(&self) -> Option<&str> {
self.first_admin.as_deref()
}
}