ensure commands for all services

This commit is contained in:
Willy Kloucek
2022-05-03 15:12:34 +02:00
parent f643de22c4
commit 977c4fd9e9
184 changed files with 5690 additions and 3268 deletions
+4 -7
View File
@@ -10,11 +10,11 @@ import (
"github.com/urfave/cli/v2"
)
// OCDavCommand is the entrypoint for the ocdav command.
// OCDavCommand is the entrypoint for the OCDav command.
func OCDavCommand(cfg *config.Config) *cli.Command {
return &cli.Command{
Name: "ocdav",
Usage: "start ocdav",
Name: cfg.OCDav.Service.Name,
Usage: subcommandDescription(cfg.OCDav.Service.Name),
Category: "extensions",
Before: func(c *cli.Context) error {
if err := parser.ParseConfig(cfg); err != nil {
@@ -24,10 +24,7 @@ func OCDavCommand(cfg *config.Config) *cli.Command {
cfg.OCDav.Commons = cfg.Commons
return nil
},
Action: func(c *cli.Context) error {
origCmd := command.OCDav(cfg.OCDav)
return handleOriginalAction(c, origCmd)
},
Subcommands: command.GetCommands(cfg.OCDav),
}
}