From 47670ec979fab56ad61a2c7736a5c25ff9918099 Mon Sep 17 00:00:00 2001 From: Victor Lacasse-Beaudoin Date: Thu, 29 Jun 2023 18:36:13 -0400 Subject: [PATCH] =?UTF-8?q?Seed()=20la=20base=20de=20donn=C3=A9es=20lors?= =?UTF-8?q?=20de=20apiCmd?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cmd/api.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cmd/api.go b/cmd/api.go index 4d6a30e..9a05014 100644 --- a/cmd/api.go +++ b/cmd/api.go @@ -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))) }, }