From 3c5e31b25a53268b413bc1e511b7486a2a1c80b9 Mon Sep 17 00:00:00 2001 From: Julien Dessaux Date: Wed, 8 Sep 2021 15:23:50 +0200 Subject: Renamed TrainStop to simply Stop --- internal/webui/webui.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'internal/webui/webui.go') 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()) } -- cgit v1.2.3