From accc9ceb1f8a261fbc766f137e0c0a19672d218c Mon Sep 17 00:00:00 2001 From: Denis Arh Date: Fri, 5 Nov 2021 07:46:04 +0100 Subject: [PATCH] Fix auth asset exports --- auth/commands/assets.go | 5 ++--- auth/commands/commands.go | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/auth/commands/assets.go b/auth/commands/assets.go index 956c24d20..f61a9e3f2 100644 --- a/auth/commands/assets.go +++ b/auth/commands/assets.go @@ -7,11 +7,10 @@ import ( "github.com/cortezaproject/corteza-server/auth" "github.com/cortezaproject/corteza-server/pkg/cli" - "github.com/cortezaproject/corteza-server/pkg/options" "github.com/spf13/cobra" ) -func assets(opt *options.Options) *cobra.Command { +func assets(app serviceInitializer) *cobra.Command { cmd := &cobra.Command{ Use: "assets", Short: "Authentication flow assets (styling, images) and templates", @@ -22,7 +21,7 @@ func assets(opt *options.Options) *cobra.Command { Short: "Exports embedded assets into provided path (must exists)", Args: cobra.MaximumNArgs(1), Run: func(cmd *cobra.Command, args []string) { - assetsRoot := opt.Auth.AssetsPath + assetsRoot := app.Options().Auth.AssetsPath if len(args) > 0 { assetsRoot = args[0] } diff --git a/auth/commands/commands.go b/auth/commands/commands.go index f1bffaa47..963cf6bb6 100644 --- a/auth/commands/commands.go +++ b/auth/commands/commands.go @@ -130,7 +130,7 @@ func Command(ctx context.Context, app serviceInitializer, storeInit func(ctx con autoDiscoverCmd, testEmails, jwtCmd, - assets(app.Options()), + assets(app), ) return cmd