Skip to content

Commit

Permalink
chore: rename params
Browse files Browse the repository at this point in the history
  • Loading branch information
kwaa committed Feb 6, 2024
1 parent da1e0fb commit c9d1d6e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions crates/apub/src/actors/db_user.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,10 @@ impl Object for ApubUser {
}

async fn read_from_id(
object_id: Url,
user_id: Url,
data: &Data<Self::DataType>,
) -> Result<Option<Self>, Self::Error> {
Ok(User::find_by_id(&object_id.to_string())
Ok(User::find_by_id(&user_id.to_string())
.one(&data.conn)
.await?
.map(Into::into))
Expand Down
4 changes: 2 additions & 2 deletions crates/apub/src/objects/db_post.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,10 @@ impl Object for ApubPost {

// 从 ID 读取
async fn read_from_id(
object_id: Url,
post_id: Url,
data: &Data<Self::DataType>,
) -> Result<Option<Self>, Self::Error> {
Ok(Post::find_by_id(&object_id.to_string())
Ok(Post::find_by_id(&post_id.to_string())
.one(&data.conn)
.await?
.map(Into::into))
Expand Down

0 comments on commit c9d1d6e

Please sign in to comment.