diff options
author | 2021-11-24 16:01:38 +0000 | |
---|---|---|
committer | 2021-11-24 17:01:38 +0100 | |
commit | ab316d22509ed6e601773a7ef66c0131aa8af24b (patch) | |
tree | 7adc35a2fc86529fa1b32229abf326037a4f6a6f /cmd/gotosocial/admincommands.go | |
parent | Fix streamed messages ending up in wrong timeline(s) (#325) (diff) | |
download | gotosocial-ab316d22509ed6e601773a7ef66c0131aa8af24b.tar.xz |
Fix broken defaults and broken flags (#314)v0.1.1
* start with a default config, not an empty config.
* some data structures were present on Empty config but not Default config
* the monkey patched CLIContext is working
* remove print debugging log
* make the behaviour of the flags consistent across all data types
Conflicts:
internal/config/config.go
* try to fix accidentally broken test
Diffstat (limited to 'cmd/gotosocial/admincommands.go')
-rw-r--r-- | cmd/gotosocial/admincommands.go | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/cmd/gotosocial/admincommands.go b/cmd/gotosocial/admincommands.go index 5d505fe77..a70693b2c 100644 --- a/cmd/gotosocial/admincommands.go +++ b/cmd/gotosocial/admincommands.go @@ -25,7 +25,7 @@ import ( "github.com/urfave/cli/v2" ) -func adminCommands() []*cli.Command { +func adminCommands(allFlags []cli.Flag) []*cli.Command { return []*cli.Command{ { Name: "admin", @@ -56,7 +56,7 @@ func adminCommands() []*cli.Command { }, }, Action: func(c *cli.Context) error { - return runAction(c, account.Create) + return runAction(c, allFlags, account.Create) }, }, { @@ -70,7 +70,7 @@ func adminCommands() []*cli.Command { }, }, Action: func(c *cli.Context) error { - return runAction(c, account.Confirm) + return runAction(c, allFlags, account.Confirm) }, }, { @@ -84,7 +84,7 @@ func adminCommands() []*cli.Command { }, }, Action: func(c *cli.Context) error { - return runAction(c, account.Promote) + return runAction(c, allFlags, account.Promote) }, }, { @@ -98,7 +98,7 @@ func adminCommands() []*cli.Command { }, }, Action: func(c *cli.Context) error { - return runAction(c, account.Demote) + return runAction(c, allFlags, account.Demote) }, }, { @@ -112,7 +112,7 @@ func adminCommands() []*cli.Command { }, }, Action: func(c *cli.Context) error { - return runAction(c, account.Disable) + return runAction(c, allFlags, account.Disable) }, }, { @@ -126,7 +126,7 @@ func adminCommands() []*cli.Command { }, }, Action: func(c *cli.Context) error { - return runAction(c, account.Suspend) + return runAction(c, allFlags, account.Suspend) }, }, { @@ -145,7 +145,7 @@ func adminCommands() []*cli.Command { }, }, Action: func(c *cli.Context) error { - return runAction(c, account.Password) + return runAction(c, allFlags, account.Password) }, }, }, @@ -161,7 +161,7 @@ func adminCommands() []*cli.Command { }, }, Action: func(c *cli.Context) error { - return runAction(c, trans.Export) + return runAction(c, allFlags, trans.Export) }, }, { @@ -175,7 +175,7 @@ func adminCommands() []*cli.Command { }, }, Action: func(c *cli.Context) error { - return runAction(c, trans.Import) + return runAction(c, allFlags, trans.Import) }, }, }, |