weldr: Return blueprint changes in descending timestamp order
This commit is contained in:
parent
cce9a2712c
commit
57f0892d93
1 changed files with 4 additions and 0 deletions
|
|
@ -1117,6 +1117,10 @@ func (api *API) blueprintsChangesHandler(writer http.ResponseWriter, request *ht
|
|||
}
|
||||
bpChanges := api.store.GetBlueprintChanges(name)
|
||||
if bpChanges != nil {
|
||||
// Sort the changes by Timestamp, descending
|
||||
sort.Slice(bpChanges, func(i, j int) bool {
|
||||
return bpChanges[i].Timestamp > bpChanges[j].Timestamp
|
||||
})
|
||||
change := change{
|
||||
Changes: bpChanges,
|
||||
Name: name,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue