Fix mainpage order
This commit is contained in:
@@ -15,7 +15,7 @@ func DbMainpage(pool *pgxpool.Pool) gin.H {
|
||||
var items []models.Washlist
|
||||
var persons []models.Person
|
||||
|
||||
witems, err := pool.Query(context.Background(), "SELECT wa.id, pe.name, ga.created_at, wa.washed \nFROM washlist wa\nINNER JOIN persons pe ON wa.personid = pe.id\nINNER JOIN gamedata ga ON wa.gamedataid = ga.id")
|
||||
witems, err := pool.Query(context.Background(), "SELECT wa.id, pe.name, ga.created_at, wa.washed \nFROM washlist wa\nINNER JOIN persons pe ON wa.personid = pe.id\nINNER JOIN gamedata ga ON wa.gamedataid = ga.id ORDER BY ga.created_at ASC")
|
||||
if err != nil {
|
||||
log.Println(err.Error())
|
||||
}
|
||||
@@ -31,7 +31,7 @@ func DbMainpage(pool *pgxpool.Pool) gin.H {
|
||||
}
|
||||
|
||||
// get persons
|
||||
wperson, err := pool.Query(context.Background(), "SELECT id, name FROM persons")
|
||||
wperson, err := pool.Query(context.Background(), "SELECT id, name FROM persons ORDER BY name ASC")
|
||||
if err != nil {
|
||||
log.Println(err.Error())
|
||||
}
|
||||
|
Reference in New Issue
Block a user