simplify commands and version handling

This commit is contained in:
Willy Kloucek
2022-01-03 13:53:27 +01:00
parent eee0d0c4c8
commit e0656daaa0
41 changed files with 437 additions and 499 deletions
+1 -7
View File
@@ -14,9 +14,6 @@ func WebDAVCommand(cfg *config.Config) *cli.Command {
Name: "webdav",
Usage: "Start webdav server",
Category: "Extensions",
Subcommands: []*cli.Command{
command.PrintVersion(cfg.WebDAV),
},
Before: func(ctx *cli.Context) error {
if err := ParseConfig(ctx, cfg); err != nil {
return err
@@ -28,10 +25,7 @@ func WebDAVCommand(cfg *config.Config) *cli.Command {
return nil
},
Action: func(c *cli.Context) error {
origCmd := command.Server(cfg.WebDAV)
return handleOriginalAction(c, origCmd)
},
Subcommands: command.GetCommands(cfg.WebDAV),
}
}