fix(times): Fix time logs being sorted incorrectly

This commit is contained in:
Noah 2024-03-21 18:38:06 -05:00
parent 6c914738a2
commit d63adde44b

View File

@ -64,8 +64,8 @@ func getTimeLogs(since time.Time, on_process_repo func(repo gitea.Repository, to
}
}
// Sort the times by Created At
sort.Slice(times, func(i, j int) bool {
return times[i].Created.Compare(times[j].Created) > 1
sort.SliceStable(times, func(i, j int) bool {
return times[j].Created.Compare(times[i].Created) < 1
})
return times
}