diff options
author | Vika <vika@fireburn.ru> | 2023-06-15 17:02:39 +0300 |
---|---|---|
committer | Vika <vika@fireburn.ru> | 2023-06-15 17:02:39 +0300 |
commit | eca7687439c2b6f804603de75501b6737a82e5a2 (patch) | |
tree | a4715e0b8d3d63ee8b77830670c473b83a70031e /kittybox-rs/src/frontend/onboarding.rs | |
parent | 59f3e2d43d30642e4242039ce3ab934961e69602 (diff) | |
download | kittybox-eca7687439c2b6f804603de75501b6737a82e5a2.tar.zst |
Database: use newtypes to represent settings
This allows much for a cleaner and idiomatic settings interface.
Diffstat (limited to 'kittybox-rs/src/frontend/onboarding.rs')
-rw-r--r-- | kittybox-rs/src/frontend/onboarding.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/kittybox-rs/src/frontend/onboarding.rs b/kittybox-rs/src/frontend/onboarding.rs index b4bae8e..88b533b 100644 --- a/kittybox-rs/src/frontend/onboarding.rs +++ b/kittybox-rs/src/frontend/onboarding.rs @@ -1,4 +1,4 @@ -use crate::database::{Settings, Storage}; +use crate::database::{settings, Storage}; use axum::{ extract::{Extension, Host}, http::StatusCode, @@ -68,7 +68,7 @@ async fn onboard<D: Storage + 'static>( )); } - db.set_setting(Settings::SiteName, user.me.as_str(), &data.blog_name) + db.set_setting::<settings::SiteName>(user.me.as_str(), data.blog_name.to_owned()) .await .map_err(FrontendError::from)?; |