From f617f34cc5550c1782d76dad7886e449ef52a020 Mon Sep 17 00:00:00 2001 From: Luc Didry Date: Wed, 28 May 2025 09:57:33 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=A9=B9=20=E2=80=94=20Make=20sure=20apps?= =?UTF-8?q?=20are=20always=20sent=20to=20client=20in=20the=20same=20order?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Related to #358 --- database/application.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/database/application.go b/database/application.go index 4ef9c0e0..f62f4688 100644 --- a/database/application.go +++ b/database/application.go @@ -47,7 +47,7 @@ func (d *GormDatabase) DeleteApplicationByID(id uint) error { // GetApplicationsByUser returns all applications from a user. func (d *GormDatabase) GetApplicationsByUser(userID uint) ([]*model.Application, error) { var apps []*model.Application - err := d.DB.Where("user_id = ?", userID).Find(&apps).Error + err := d.DB.Where("user_id = ?", userID).Order("id ASC").Find(&apps).Error if err == gorm.ErrRecordNotFound { err = nil }