fix domain map
alex wennerberg alex@alexwennerberg.com
Sat, 09 Jan 2021 16:52:10 -0800
M
db.go
→
db.go
@@ -102,8 +102,10 @@
var domains map[string]string func refreshDomainMap() error { - rows, err := DB.Query(`SELECT domain, username from user WHERE domain != nil`) + domains = make(map[string]string) + rows, err := DB.Query(`SELECT domain, username from user WHERE domain != ""`) if err != nil { + log.Println(err) return err } for rows.Next() {