fix: must include the column im ordering for.....

This commit is contained in:
əlemi 2024-12-27 02:24:16 +01:00
parent 256e880d6c
commit a7cbbddc61
Signed by: alemi
GPG key ID: A4895B84D311642C

View file

@ -1,5 +1,5 @@
use axum::extract::{Path, Query, State};
use sea_orm::{ColumnTrait, QueryFilter, QueryOrder, QuerySelect, RelationTrait};
use sea_orm::{ColumnTrait, QueryFilter, QueryOrder, QuerySelect, RelationTrait, SelectColumns};
use upub::{model, selector::{RichFillable, RichObject}, Context};
@ -36,6 +36,7 @@ pub async fn page(
.join(sea_orm::JoinType::InnerJoin, upub::model::like::Relation::Activities.def())
.filter(auth.filter_activities())
.filter(upub::model::like::Column::Actor.eq(user.internal))
.select_column(upub::model::like::Column::Published)
.order_by_desc(upub::model::like::Column::Published)
.limit(limit)
.offset(offset)