Forgot to connect to the DB in the admin tool

This commit is contained in:
2022-08-06 16:47:46 +02:00
parent f3f8d353f1
commit cbf17e7d27
3 changed files with 92 additions and 69 deletions

View File

@@ -36,6 +36,7 @@ func (cmd *AddToken) Run() error {
if err != nil {
return err
}
tx.Commit(ctx)
return nil
}
@@ -54,7 +55,10 @@ var cli Cli
func main() {
ctx := kong.Parse(&cli)
//db.Connect(cli.Db)
if err := db.Connect(cli.Db); err != nil {
println(err.Error())
os.Exit(0)
}
println(ctx.Command())
if err := ctx.Run(); err != nil {
println(err.Error())