mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-04-23 20:49:13 -05:00
simplify commands and version handling
This commit is contained in:
@@ -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),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user