diff options
author | Vika <vika@fireburn.ru> | 2024-07-09 22:43:21 +0300 |
---|---|---|
committer | Vika <vika@fireburn.ru> | 2024-07-09 22:44:01 +0300 |
commit | 2e9c292bb989ffff2c99aa2a6062962c913b3586 (patch) | |
tree | 9c148d9e8fcbd7756ab8d27ae110075beea8e615 /src/frontend/onboarding.rs | |
parent | 644e19aa08b2629d4b69281e14d702f0b9673687 (diff) | |
download | kittybox-2e9c292bb989ffff2c99aa2a6062962c913b3586.tar.zst |
database: use Url to represent user authorities
This makes the interface more consistent and resistant to misuse.
Diffstat (limited to 'src/frontend/onboarding.rs')
-rw-r--r-- | src/frontend/onboarding.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/frontend/onboarding.rs b/src/frontend/onboarding.rs index e44e866..faf8cdd 100644 --- a/src/frontend/onboarding.rs +++ b/src/frontend/onboarding.rs @@ -82,11 +82,11 @@ async fn onboard<D: Storage + 'static>( .map(|port| format!(":{}", port)) .unwrap_or_default() ); - db.set_setting::<settings::SiteName>(&user_domain, data.blog_name.to_owned()) + db.set_setting::<settings::SiteName>(&user.me, data.blog_name.to_owned()) .await .map_err(FrontendError::from)?; - db.set_setting::<settings::Webring>(&user_domain, false) + db.set_setting::<settings::Webring>(&user.me, false) .await .map_err(FrontendError::from)?; @@ -95,7 +95,7 @@ async fn onboard<D: Storage + 'static>( hcard["properties"]["uid"] = serde_json::json!([&user_uid]); crate::micropub::normalize_mf2(hcard, &user) }; - db.put_post(&hcard, user_domain.as_str()) + db.put_post(&hcard, &user.me) .await .map_err(FrontendError::from)?; @@ -113,7 +113,7 @@ async fn onboard<D: Storage + 'static>( &user, ); - db.put_post(&feed, user_uid.as_str()) + db.put_post(&feed, &user.me) .await .map_err(FrontendError::from)?; } |