forked from alemi/upub
fix: filter_objects() -> filter()
This commit is contained in:
parent
781619a899
commit
45da3a1684
3 changed files with 6 additions and 6 deletions
|
@ -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,
|
||||
|
|
|
@ -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::<RichActivity>()
|
||||
.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::<String>()
|
||||
|
|
|
@ -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::<String>()
|
||||
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue