From 2e9c292bb989ffff2c99aa2a6062962c913b3586 Mon Sep 17 00:00:00 2001 From: Vika Date: Tue, 9 Jul 2024 22:43:21 +0300 Subject: database: use Url to represent user authorities This makes the interface more consistent and resistant to misuse. --- src/frontend/onboarding.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/frontend/onboarding.rs') 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( .map(|port| format!(":{}", port)) .unwrap_or_default() ); - db.set_setting::(&user_domain, data.blog_name.to_owned()) + db.set_setting::(&user.me, data.blog_name.to_owned()) .await .map_err(FrontendError::from)?; - db.set_setting::(&user_domain, false) + db.set_setting::(&user.me, false) .await .map_err(FrontendError::from)?; @@ -95,7 +95,7 @@ async fn onboard( 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( &user, ); - db.put_post(&feed, user_uid.as_str()) + db.put_post(&feed, &user.me) .await .map_err(FrontendError::from)?; } -- cgit 1.4.1