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 context = ctx.oid(&id);
|
||||||
|
|
||||||
let count = upub::Query::feed(auth.my_id())
|
let count = upub::Query::feed(auth.my_id())
|
||||||
.filter(auth.filter_objects())
|
.filter(auth.filter())
|
||||||
.filter(model::object::Column::Context.eq(&context))
|
.filter(model::object::Column::Context.eq(&context))
|
||||||
.count(ctx.db())
|
.count(ctx.db())
|
||||||
.await?;
|
.await?;
|
||||||
|
@ -31,7 +31,7 @@ pub async fn page(
|
||||||
crate::builders::paginate_feed(
|
crate::builders::paginate_feed(
|
||||||
upub::url!(ctx, "/objects/{id}/context/page"),
|
upub::url!(ctx, "/objects/{id}/context/page"),
|
||||||
Condition::all()
|
Condition::all()
|
||||||
.add(auth.filter_objects())
|
.add(auth.filter())
|
||||||
.add(model::object::Column::Context.eq(context)),
|
.add(model::object::Column::Context.eq(context)),
|
||||||
ctx.db(),
|
ctx.db(),
|
||||||
page,
|
page,
|
||||||
|
|
|
@ -29,7 +29,7 @@ pub async fn view(
|
||||||
|
|
||||||
let item = upub::Query::feed(auth.my_id())
|
let item = upub::Query::feed(auth.my_id())
|
||||||
.filter(model::object::Column::Id.eq(&oid))
|
.filter(model::object::Column::Id.eq(&oid))
|
||||||
.filter(auth.filter_objects())
|
.filter(auth.filter())
|
||||||
.into_model::<RichActivity>()
|
.into_model::<RichActivity>()
|
||||||
.one(ctx.db())
|
.one(ctx.db())
|
||||||
.await?
|
.await?
|
||||||
|
@ -46,7 +46,7 @@ pub async fn view(
|
||||||
if ctx.cfg().security.show_reply_ids {
|
if ctx.cfg().security.show_reply_ids {
|
||||||
let replies_ids = upub::Query::feed(auth.my_id())
|
let replies_ids = upub::Query::feed(auth.my_id())
|
||||||
.filter(model::object::Column::InReplyTo.eq(oid))
|
.filter(model::object::Column::InReplyTo.eq(oid))
|
||||||
.filter(auth.filter_objects())
|
.filter(auth.filter())
|
||||||
.select_only()
|
.select_only()
|
||||||
.select_column(model::object::Column::Id)
|
.select_column(model::object::Column::Id)
|
||||||
.into_tuple::<String>()
|
.into_tuple::<String>()
|
||||||
|
|
|
@ -17,7 +17,7 @@ pub async fn get(
|
||||||
|
|
||||||
let replies_ids = upub::Query::feed(auth.my_id())
|
let replies_ids = upub::Query::feed(auth.my_id())
|
||||||
.filter(model::object::Column::InReplyTo.eq(ctx.oid(&id)))
|
.filter(model::object::Column::InReplyTo.eq(ctx.oid(&id)))
|
||||||
.filter(auth.filter_objects())
|
.filter(auth.filter())
|
||||||
.select_only()
|
.select_only()
|
||||||
.select_column(model::object::Column::Id)
|
.select_column(model::object::Column::Id)
|
||||||
.into_tuple::<String>()
|
.into_tuple::<String>()
|
||||||
|
@ -47,7 +47,7 @@ pub async fn page(
|
||||||
crate::builders::paginate_feed(
|
crate::builders::paginate_feed(
|
||||||
page_id,
|
page_id,
|
||||||
Condition::all()
|
Condition::all()
|
||||||
.add(auth.filter_objects())
|
.add(auth.filter())
|
||||||
.add(model::object::Column::InReplyTo.eq(oid)),
|
.add(model::object::Column::InReplyTo.eq(oid)),
|
||||||
ctx.db(),
|
ctx.db(),
|
||||||
page,
|
page,
|
||||||
|
|
Loading…
Reference in a new issue