sorted products by name in ascending ordere | NTP-24876 (#472)

This commit is contained in:
Rajeev Nandan
2025-01-13 13:18:47 +05:30
committed by GitHub
parent e83e5075a8
commit aa7fdc7f9a

View File

@@ -32,7 +32,7 @@ func (repo *productRepositoryImpl) UpdateProduct(productEntity *ProductEntity) e
func (repo *productRepositoryImpl) GetAllProducts() ([]ProductEntity, error) {
var entities []ProductEntity
result := repo.db.Find(&entities)
result := repo.db.Order("name ASC").Find(&entities)
if result.Error != nil {
return nil, result.Error
}