Merge pull request 'Seed() la base de données lors de apiCmd' (#30) from feature/autoseed into main
Reviewed-on: #30
This commit is contained in:
commit
93495d76e9
1 changed files with 5 additions and 0 deletions
|
@ -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)))
|
||||
},
|
||||
}
|
||||
|
|
Reference in a new issue