From 45da3a1684c8cd924291bbbcf30d88b8a7f7c9e9 Mon Sep 17 00:00:00 2001 From: alemi Date: Tue, 2 Jul 2024 19:32:50 +0200 Subject: [PATCH] fix: filter_objects() -> filter() --- upub/routes/src/activitypub/object/context.rs | 4 ++-- upub/routes/src/activitypub/object/mod.rs | 4 ++-- upub/routes/src/activitypub/object/replies.rs | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/upub/routes/src/activitypub/object/context.rs b/upub/routes/src/activitypub/object/context.rs index 9d8a6b3d..09ae67a5 100644 --- a/upub/routes/src/activitypub/object/context.rs +++ b/upub/routes/src/activitypub/object/context.rs @@ -12,7 +12,7 @@ pub async fn get( let context = ctx.oid(&id); let count = upub::Query::feed(auth.my_id()) - .filter(auth.filter_objects()) + .filter(auth.filter()) .filter(model::object::Column::Context.eq(&context)) .count(ctx.db()) .await?; @@ -31,7 +31,7 @@ pub async fn page( crate::builders::paginate_feed( upub::url!(ctx, "/objects/{id}/context/page"), Condition::all() - .add(auth.filter_objects()) + .add(auth.filter()) .add(model::object::Column::Context.eq(context)), ctx.db(), page, diff --git a/upub/routes/src/activitypub/object/mod.rs b/upub/routes/src/activitypub/object/mod.rs index 6b8de056..de74e4cc 100644 --- a/upub/routes/src/activitypub/object/mod.rs +++ b/upub/routes/src/activitypub/object/mod.rs @@ -29,7 +29,7 @@ pub async fn view( let item = upub::Query::feed(auth.my_id()) .filter(model::object::Column::Id.eq(&oid)) - .filter(auth.filter_objects()) + .filter(auth.filter()) .into_model::() .one(ctx.db()) .await? @@ -46,7 +46,7 @@ pub async fn view( if ctx.cfg().security.show_reply_ids { let replies_ids = upub::Query::feed(auth.my_id()) .filter(model::object::Column::InReplyTo.eq(oid)) - .filter(auth.filter_objects()) + .filter(auth.filter()) .select_only() .select_column(model::object::Column::Id) .into_tuple::() diff --git a/upub/routes/src/activitypub/object/replies.rs b/upub/routes/src/activitypub/object/replies.rs index 12ae3ea2..24505e3c 100644 --- a/upub/routes/src/activitypub/object/replies.rs +++ b/upub/routes/src/activitypub/object/replies.rs @@ -17,7 +17,7 @@ pub async fn get( let replies_ids = upub::Query::feed(auth.my_id()) .filter(model::object::Column::InReplyTo.eq(ctx.oid(&id))) - .filter(auth.filter_objects()) + .filter(auth.filter()) .select_only() .select_column(model::object::Column::Id) .into_tuple::() @@ -47,7 +47,7 @@ pub async fn page( crate::builders::paginate_feed( page_id, Condition::all() - .add(auth.filter_objects()) + .add(auth.filter()) .add(model::object::Column::InReplyTo.eq(oid)), ctx.db(), page,