diff options
author | Julien Dessaux | 2021-09-08 15:23:50 +0200 |
---|---|---|
committer | Julien Dessaux | 2021-09-08 16:12:01 +0200 |
commit | 3c5e31b25a53268b413bc1e511b7486a2a1c80b9 (patch) | |
tree | f6fe9a82eab8abf7a01f84bce954edc7462f87a2 /internal/webui/webui.go | |
parent | Removed useless user model code (diff) | |
download | trains-3c5e31b25a53268b413bc1e511b7486a2a1c80b9.tar.gz trains-3c5e31b25a53268b413bc1e511b7486a2a1c80b9.tar.bz2 trains-3c5e31b25a53268b413bc1e511b7486a2a1c80b9.zip |
Renamed TrainStop to simply Stop
Diffstat (limited to 'internal/webui/webui.go')
-rw-r--r-- | internal/webui/webui.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/internal/webui/webui.go b/internal/webui/webui.go index 1a251f4..fa59f68 100644 --- a/internal/webui/webui.go +++ b/internal/webui/webui.go @@ -19,11 +19,11 @@ func Run(c *config.Config, dbEnv *database.DBEnv) { http.Handle("/login", handler{&e, loginHandler}) http.Handle("/static/", http.FileServer(http.FS(staticFS))) - if i, err := dbEnv.CountTrainStops(); err == nil && i == 0 { + if i, err := dbEnv.CountStops(); err == nil && i == 0 { log.Printf("No trains stops data found, updating...") - if trainStops, err := e.navitia.GetTrainStops(); err == nil { + if trainStops, err := e.navitia.GetStops(); err == nil { log.Printf("Updated trains stops data from navitia api, got %d results", len(trainStops)) - if err = dbEnv.ReplaceAndImportTrainStops(trainStops); err != nil { + if err = dbEnv.ReplaceAndImportStops(trainStops); err != nil { if dberr, ok := err.(*database.QueryError); ok { log.Printf("%+v", dberr.Unwrap()) } |