about summary refs log tree commit diff
path: root/src/micropub
diff options
context:
space:
mode:
Diffstat (limited to 'src/micropub')
-rw-r--r--src/micropub/mod.rs6
-rw-r--r--src/micropub/util.rs2
2 files changed, 4 insertions, 4 deletions
diff --git a/src/micropub/mod.rs b/src/micropub/mod.rs
index 8f7ff90..74f53a0 100644
--- a/src/micropub/mod.rs
+++ b/src/micropub/mod.rs
@@ -292,7 +292,7 @@ pub(crate) async fn _post<D: 'static + Storage>(
     );
     // Save the post
     tracing::debug!("Saving post to database...");
-    db.put_post(&mf2, &user_domain).await?;
+    db.put_post(&mf2, &user.me).await?;
 
     let mut channels = mf2["properties"]["channel"]
         .as_array()
@@ -579,7 +579,7 @@ pub(crate) async fn query<D: Storage, A: AuthBackend>(
     );
     match query.q {
         QueryType::Config => {
-            let channels: Vec<MicropubChannel> = match db.get_channels(&user_domain).await {
+            let channels: Vec<MicropubChannel> = match db.get_channels(&user.me).await {
                 Ok(chans) => chans,
                 Err(err) => {
                     return MicropubError::new(
@@ -636,7 +636,7 @@ pub(crate) async fn query<D: Storage, A: AuthBackend>(
                 }
             }
         }
-        QueryType::Channel => match db.get_channels(&user_domain).await {
+        QueryType::Channel => match db.get_channels(&user.me).await {
             Ok(chans) => axum::response::Json(json!({ "channels": chans })).into_response(),
             Err(err) => MicropubError::new(
                 ErrorType::InternalServerError,
diff --git a/src/micropub/util.rs b/src/micropub/util.rs
index b6a045d..0633ce9 100644
--- a/src/micropub/util.rs
+++ b/src/micropub/util.rs
@@ -212,7 +212,7 @@ pub(crate) async fn create_feed(
         }),
         user,
     );
-    storage.put_post(&feed, user.me.as_str()).await?;
+    storage.put_post(&feed, &user.me).await?;
     storage.add_to_feed(channel, uid).await
 }