feat: sort alias accounts descending and fixed sorting for csv batch (#573)

sort alias accounts descending and fixed sorting for csv batch (#573)
This commit is contained in:
knylbyte
2026-02-12 18:50:40 +01:00
committed by GitHub
parent d21ee774e0
commit 55ea77d8f2
3 changed files with 38 additions and 34 deletions
+3 -3
View File
@@ -527,9 +527,9 @@ pub async fn persist_source_config(
{
if let Some(aliases) = input.aliases.as_mut() {
aliases.sort_by(|a, b| {
let a_ts = a.exp_date.unwrap_or(i64::MAX);
let b_ts = b.exp_date.unwrap_or(i64::MAX);
a_ts.cmp(&b_ts).then_with(|| a.name.cmp(&b.name))
let a_ts = a.exp_date.unwrap_or(i64::MIN);
let b_ts = b.exp_date.unwrap_or(i64::MIN);
b_ts.cmp(&a_ts).then_with(|| a.name.cmp(&b.name))
});
}
}