summaryrefslogtreecommitdiff
path: root/cmd/gotosocial/admin.go
diff options
context:
space:
mode:
authorLibravatar Daenney <daenney@users.noreply.github.com>2023-03-27 16:02:26 +0200
committerLibravatar GitHub <noreply@github.com>2023-03-27 16:02:26 +0200
commit7d098633937a219aa96f1574fa9cc15aec1dd9fe (patch)
tree0e52f09ea8f461e6fa4264aa7eac7337f28c9af2 /cmd/gotosocial/admin.go
parent[chore]: Bump github.com/tdewolff/minify/v2 from 2.12.4 to 2.12.5 (#1649) (diff)
downloadgotosocial-7d098633937a219aa96f1574fa9cc15aec1dd9fe.tar.xz
[feature] Add list command to admin account (#1648)
* [feature] Add list command to admin account Relates to: #388 * Print booleans as yes/no too
Diffstat (limited to 'cmd/gotosocial/admin.go')
-rw-r--r--cmd/gotosocial/admin.go12
1 files changed, 12 insertions, 0 deletions
diff --git a/cmd/gotosocial/admin.go b/cmd/gotosocial/admin.go
index 185880e3d..810d57e54 100644
--- a/cmd/gotosocial/admin.go
+++ b/cmd/gotosocial/admin.go
@@ -54,6 +54,18 @@ func adminCommands() *cobra.Command {
config.AddAdminAccountCreate(adminAccountCreateCmd)
adminAccountCmd.AddCommand(adminAccountCreateCmd)
+ adminAccountListCmd := &cobra.Command{
+ Use: "list",
+ Short: "list all existing local accounts",
+ PreRunE: func(cmd *cobra.Command, args []string) error {
+ return preRun(preRunArgs{cmd: cmd})
+ },
+ RunE: func(cmd *cobra.Command, args []string) error {
+ return run(cmd.Context(), account.List)
+ },
+ }
+ adminAccountCmd.AddCommand(adminAccountListCmd)
+
adminAccountConfirmCmd := &cobra.Command{
Use: "confirm",
Short: "confirm an existing local account manually, thereby skipping email confirmation",