mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-01-06 04:09:40 -06:00
addded thumbnails to the new inheritance strategy
This commit is contained in:
@@ -5,7 +5,6 @@ package command
|
||||
|
||||
import (
|
||||
"github.com/owncloud/ocis/ocis-pkg/config"
|
||||
"github.com/owncloud/ocis/ocis-pkg/shared"
|
||||
"github.com/owncloud/ocis/ocis/pkg/register"
|
||||
"github.com/owncloud/ocis/thumbnails/pkg/command"
|
||||
"github.com/urfave/cli/v2"
|
||||
@@ -13,8 +12,6 @@ import (
|
||||
|
||||
// ThumbnailsCommand is the entrypoint for the thumbnails command.
|
||||
func ThumbnailsCommand(cfg *config.Config) *cli.Command {
|
||||
var globalLog shared.Log
|
||||
|
||||
return &cli.Command{
|
||||
Name: "thumbnails",
|
||||
Usage: "Start thumbnails server",
|
||||
@@ -27,16 +24,13 @@ func ThumbnailsCommand(cfg *config.Config) *cli.Command {
|
||||
return err
|
||||
}
|
||||
|
||||
globalLog = cfg.Log
|
||||
if cfg.Commons != nil {
|
||||
cfg.Thumbnails.Commons = cfg.Commons
|
||||
}
|
||||
|
||||
return nil
|
||||
},
|
||||
Action: func(c *cli.Context) error {
|
||||
// if thumbnails logging is empty in ocis.yaml
|
||||
if (cfg.Thumbnails.Log == shared.Log{}) && (globalLog != shared.Log{}) {
|
||||
// we can safely inherit the global logging values.
|
||||
cfg.Thumbnails.Log = globalLog
|
||||
}
|
||||
origCmd := command.Server(cfg.Thumbnails)
|
||||
return handleOriginalAction(c, origCmd)
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user