3
0

Fix auth asset exports

This commit is contained in:
Denis Arh
2021-11-05 07:46:04 +01:00
parent 432e2ff54d
commit accc9ceb1f
2 changed files with 3 additions and 4 deletions

View File

@@ -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]
}

View File

@@ -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