diff --git a/source/group_data/mod.rs b/source/group_data/mod.rs index 28be0cc..4ef31f0 100644 --- a/source/group_data/mod.rs +++ b/source/group_data/mod.rs @@ -48,12 +48,13 @@ impl GroupDataModel { amount: u64, name: &str, ) -> Result> { - let groups = GroupDataEntity::find() - .order_by_asc(GroupDataColumn::SnapshotId) + let mut groups = GroupDataEntity::find() + .order_by_desc(GroupDataColumn::SnapshotId) .filter(GroupDataColumn::Name.eq(name)) .limit(amount) .all(db) .await?; + groups.reverse(); Ok(groups) }