From 124b9e2a052d11fa0434d156e8cba5e12ce1a56b Mon Sep 17 00:00:00 2001 From: Vivek Patel Date: Wed, 6 Oct 2021 19:33:55 +0530 Subject: [PATCH] Instantiates API GW after system service Fixes workflow filter panics after reloading API GW routes --- app/boot_levels.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/app/boot_levels.go b/app/boot_levels.go index 98b157b49..f8cbe6fb4 100644 --- a/app/boot_levels.go +++ b/app/boot_levels.go @@ -358,12 +358,6 @@ func (app *CortezaApp) InitServices(ctx context.Context) (err error) { return err } - // Initialize API GW bits - apigw.Setup(options.Apigw(), app.Log, app.Store) - if err = apigw.Service().Reload(ctx); err != nil { - return err - } - if app.Opt.Messagebus.Enabled { // initialize all the queue handlers messagebus.Service().Init(ctx, app.Store) @@ -418,6 +412,12 @@ func (app *CortezaApp) InitServices(ctx context.Context) (err error) { corredor.Service().SetUserFinder(sysService.DefaultUser) corredor.Service().SetRoleFinder(sysService.DefaultRole) + // Initialize API GW bits + apigw.Setup(options.Apigw(), app.Log, app.Store) + if err = apigw.Service().Reload(ctx); err != nil { + return err + } + if app.Opt.Federation.Enabled { // Initializes federation services //