forked from alemi/upub
fix: use WrappedObject type for context query
This commit is contained in:
parent
645e14cc32
commit
4e5e8f8532
1 changed files with 3 additions and 3 deletions
|
@ -1,7 +1,7 @@
|
||||||
use axum::extract::{Path, Query, State};
|
use axum::extract::{Path, Query, State};
|
||||||
use sea_orm::{ColumnTrait, Order, PaginatorTrait, QueryFilter, QueryOrder, QuerySelect};
|
use sea_orm::{ColumnTrait, Order, PaginatorTrait, QueryFilter, QueryOrder, QuerySelect};
|
||||||
|
|
||||||
use crate::{model, routes::activitypub::{jsonld::LD, JsonLD, Pagination}, server::{auth::AuthIdentity, Context}, url};
|
use crate::{model::{self, addressing::WrappedObject}, routes::activitypub::{jsonld::LD, JsonLD, Pagination}, server::{auth::AuthIdentity, Context}, url};
|
||||||
|
|
||||||
pub async fn get(
|
pub async fn get(
|
||||||
State(ctx): State<Context>,
|
State(ctx): State<Context>,
|
||||||
|
@ -45,7 +45,7 @@ pub async fn page(
|
||||||
.order_by(model::addressing::Column::Published, Order::Desc)
|
.order_by(model::addressing::Column::Published, Order::Desc)
|
||||||
.limit(limit)
|
.limit(limit)
|
||||||
.offset(offset)
|
.offset(offset)
|
||||||
.into_model::<model::object::Model>()
|
.into_model::<WrappedObject>()
|
||||||
.all(ctx.db())
|
.all(ctx.db())
|
||||||
.await?;
|
.await?;
|
||||||
|
|
||||||
|
@ -55,7 +55,7 @@ pub async fn page(
|
||||||
offset, limit,
|
offset, limit,
|
||||||
items
|
items
|
||||||
.into_iter()
|
.into_iter()
|
||||||
.map(|x| x.ap())
|
.map(|x| x.object.ap())
|
||||||
.collect()
|
.collect()
|
||||||
).ld_context()
|
).ld_context()
|
||||||
))
|
))
|
||||||
|
|
Loading…
Reference in a new issue