From 4e5e8f8532b672fe52c9ecbeb4b1aa917db5f018 Mon Sep 17 00:00:00 2001 From: alemi Date: Sun, 21 Apr 2024 17:11:50 +0200 Subject: [PATCH] fix: use WrappedObject type for context query --- src/routes/activitypub/context.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/routes/activitypub/context.rs b/src/routes/activitypub/context.rs index 1a352372..0bf05664 100644 --- a/src/routes/activitypub/context.rs +++ b/src/routes/activitypub/context.rs @@ -1,7 +1,7 @@ use axum::extract::{Path, Query, State}; 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( State(ctx): State, @@ -45,7 +45,7 @@ pub async fn page( .order_by(model::addressing::Column::Published, Order::Desc) .limit(limit) .offset(offset) - .into_model::() + .into_model::() .all(ctx.db()) .await?; @@ -55,7 +55,7 @@ pub async fn page( offset, limit, items .into_iter() - .map(|x| x.ap()) + .map(|x| x.object.ap()) .collect() ).ld_context() ))