Move update logic to subcommand

This commit is contained in:
The Magician 2024-10-04 12:06:59 +01:00
parent 0e3ee54e1c
commit c0c290916a
1 changed files with 4 additions and 1 deletions

View File

@ -12,6 +12,7 @@ import (
)
const (
UpdateSubcommand string = "update"
ImportSubcommand string = "import"
)
@ -24,7 +25,6 @@ func main() {
db := database.GetDatabaseFromConfig("config." + profile + ".json")
figlet.ReadFigletFonts()
cli.ShowSplashScreen()
cli.RunUpdateCheck(db)
// TODO: Decide in what form we need to retain this functionality if any
//cli.MainCliLoop(db)
@ -54,6 +54,9 @@ func main() {
err = logic.ImportDelverLensCards(db, delverLensCards, storageAreaId)
logic.Check(err)
break
case UpdateSubcommand:
cli.RunUpdateCheck(db)
break
default:
fmt.Fprintf(os.Stderr, "Unrecognized subcommand: %s\n", os.Args[1])
break