Skip to content
Snippets Groups Projects
Commit c4ee45e8 authored by Réthelyi Bálint's avatar Réthelyi Bálint :no_mouth:
Browse files

fix products sort on homepage too

parent b6dd4957
Branches
Tags v1.8.4
No related merge requests found
Pipeline #45090 passed
...@@ -240,7 +240,7 @@ func GetProducts() ([]*Product, error) { ...@@ -240,7 +240,7 @@ func GetProducts() ([]*Product, error) {
func GetAvailableProducts() ([]*Product, error) { func GetAvailableProducts() ([]*Product, error) {
var products []*Product var products []*Product
e := db.Model(&products).Where("Price > ? AND Buyable = ?", 0, true).Order("name").Select() e := db.Model(&products).Where("Price > ? AND Buyable = ?", 0, true).Order("name ASC").Select()
return products, e return products, e
} }
......
...@@ -69,7 +69,7 @@ func GetUserInfoBySession(r *http.Request) (*User, error) { ...@@ -69,7 +69,7 @@ func GetUserInfoBySession(r *http.Request) (*User, error) {
} }
} }
ps, e := db.GetProducts() ps, e := db.GetAvailableProducts()
if e != nil { if e != nil {
//TODO: error handling //TODO: error handling
return nil, e return nil, e
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment