sorted products by name in ascending ordere | NTP-24876 (#472)
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user