sort by created_at

pull/1113/head
akash-sachan 2023-05-11 18:19:56 +05:30
parent ad4c02858c
commit 2f4c518705
1 changed files with 1 additions and 1 deletions

View File

@ -34,7 +34,7 @@ func (i *Incident) BeforeCreate() error {
}
func (i *Incident) AfterFind() {
db.Model(i).Related(&i.Updates).Order("id DESC")
db.Model(i).Related(&i.Updates).Order("created_at DESC")
metrics.Query("incident", "find")
}