timetable-extension #1

Open
fred.boniface wants to merge 163 commits from timetable-extension into main
4 changed files with 8 additions and 4 deletions
Showing only changes of commit 2ef228a192 - Show all commits

View File

@ -17,7 +17,7 @@ var MongoClient (*mongo.Client)
// Builds the DB URI based on the loaded configuration parameters // Builds the DB URI based on the loaded configuration parameters
func getDbUri(cfg *helpers.Configuration) string { func getDbUri(cfg *helpers.Configuration) string {
var uri = "mongodb://" + cfg.DbUser + ":" + cfg.DbPass + "@" + cfg.DbHost + ":" + cfg.DbPort + "?authSource=owlboard" var uri = "mongodb://" + cfg.DbUser + ":" + cfg.DbPass + "@" + cfg.DbHost + ":" + cfg.DbPort + "/?authSource=owlboard"
return uri return uri
} }

View File

@ -5,7 +5,7 @@ import (
) )
// Version Constants // Version Constants
const versionNum string = "2024.11.5" const versionNum string = "2024.11.6"
const versionSuffix string = "" const versionSuffix string = ""
const Version string = versionNum + versionSuffix const Version string = versionNum + versionSuffix

View File

@ -67,4 +67,9 @@ func Check() {
if err != nil { if err != nil {
log.Error("Error updating PIS Data", zap.Error(err)) log.Error("Error updating PIS Data", zap.Error(err))
} }
err = dbAccess.PutPisMetadata(apiResp.Name)
if err != nil {
log.Error("Error updating PIS Metadata", zap.Error(err))
}
} }

View File

@ -54,8 +54,7 @@ func runUpdate(tarballUrl string) error {
} }
log.Info("Loaded PIS Files to Slice") log.Info("Loaded PIS Files to Slice")
// Temporarily use "pis_testing" collection to ensure all works as expected err = dbAccess.DropCollection(dbAccess.PisCollection)
err = dbAccess.DropCollection("pis_testing")
if err != nil { if err != nil {
return err return err
} }