Seed() la base de données lors de apiCmd

This commit is contained in:
Victor Lacasse-Beaudoin 2023-06-29 18:36:13 -04:00
parent c7d88737b8
commit 47670ec979

View file

@ -66,6 +66,11 @@ var apiCmd = &cobra.Command{
log.Fatalf("Database was supposed to be ready but Ping() failed.\n Error: %s\n", err)
}
_, err = client.Seed()
if err != nil {
log.Fatalf("Error during client.Seed(): %s", err)
}
e.Logger.Fatal(e.Start(fmt.Sprintf(":%d", apiPort)))
},
}