summaryrefslogtreecommitdiff
path: root/cmd/gotosocial/admin.go
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/gotosocial/admin.go')
-rw-r--r--cmd/gotosocial/admin.go18
1 files changed, 9 insertions, 9 deletions
diff --git a/cmd/gotosocial/admin.go b/cmd/gotosocial/admin.go
index dcce7fb0a..2e4336d7a 100644
--- a/cmd/gotosocial/admin.go
+++ b/cmd/gotosocial/admin.go
@@ -46,7 +46,7 @@ func adminCommands() *cobra.Command {
Use: "create",
Short: "create a new account",
PreRunE: func(cmd *cobra.Command, args []string) error {
- return preRun(cmd)
+ return preRun(preRunArgs{cmd: cmd})
},
RunE: func(cmd *cobra.Command, args []string) error {
return run(cmd.Context(), account.Create)
@@ -59,7 +59,7 @@ func adminCommands() *cobra.Command {
Use: "confirm",
Short: "confirm an existing account manually, thereby skipping email confirmation",
PreRunE: func(cmd *cobra.Command, args []string) error {
- return preRun(cmd)
+ return preRun(preRunArgs{cmd: cmd})
},
RunE: func(cmd *cobra.Command, args []string) error {
return run(cmd.Context(), account.Confirm)
@@ -72,7 +72,7 @@ func adminCommands() *cobra.Command {
Use: "promote",
Short: "promote an account to admin",
PreRunE: func(cmd *cobra.Command, args []string) error {
- return preRun(cmd)
+ return preRun(preRunArgs{cmd: cmd})
},
RunE: func(cmd *cobra.Command, args []string) error {
return run(cmd.Context(), account.Promote)
@@ -85,7 +85,7 @@ func adminCommands() *cobra.Command {
Use: "demote",
Short: "demote an account from admin to normal user",
PreRunE: func(cmd *cobra.Command, args []string) error {
- return preRun(cmd)
+ return preRun(preRunArgs{cmd: cmd})
},
RunE: func(cmd *cobra.Command, args []string) error {
return run(cmd.Context(), account.Demote)
@@ -98,7 +98,7 @@ func adminCommands() *cobra.Command {
Use: "disable",
Short: "prevent an account from signing in or posting etc, but don't delete anything",
PreRunE: func(cmd *cobra.Command, args []string) error {
- return preRun(cmd)
+ return preRun(preRunArgs{cmd: cmd})
},
RunE: func(cmd *cobra.Command, args []string) error {
return run(cmd.Context(), account.Disable)
@@ -111,7 +111,7 @@ func adminCommands() *cobra.Command {
Use: "suspend",
Short: "completely remove an account and all of its posts, media, etc",
PreRunE: func(cmd *cobra.Command, args []string) error {
- return preRun(cmd)
+ return preRun(preRunArgs{cmd: cmd})
},
RunE: func(cmd *cobra.Command, args []string) error {
return run(cmd.Context(), account.Suspend)
@@ -124,7 +124,7 @@ func adminCommands() *cobra.Command {
Use: "password",
Short: "set a new password for the given account",
PreRunE: func(cmd *cobra.Command, args []string) error {
- return preRun(cmd)
+ return preRun(preRunArgs{cmd: cmd})
},
RunE: func(cmd *cobra.Command, args []string) error {
return run(cmd.Context(), account.Password)
@@ -143,7 +143,7 @@ func adminCommands() *cobra.Command {
Use: "export",
Short: "export data from the database to file at the given path",
PreRunE: func(cmd *cobra.Command, args []string) error {
- return preRun(cmd)
+ return preRun(preRunArgs{cmd: cmd})
},
RunE: func(cmd *cobra.Command, args []string) error {
return run(cmd.Context(), trans.Export)
@@ -156,7 +156,7 @@ func adminCommands() *cobra.Command {
Use: "import",
Short: "import data from a file into the database",
PreRunE: func(cmd *cobra.Command, args []string) error {
- return preRun(cmd)
+ return preRun(preRunArgs{cmd: cmd})
},
RunE: func(cmd *cobra.Command, args []string) error {
return run(cmd.Context(), trans.Import)