mirror of
https://github.com/photoprism/photoprism.git
synced 2025-10-06 01:07:16 +08:00
CLI: Refactor tests and config initialization
Signed-off-by: Michael Mayer <michael@photoprism.app>
This commit is contained in:
15
internal/commands/config.go
Normal file
15
internal/commands/config.go
Normal file
@@ -0,0 +1,15 @@
|
||||
package commands
|
||||
|
||||
import (
|
||||
"github.com/urfave/cli"
|
||||
|
||||
"github.com/photoprism/photoprism/internal/config"
|
||||
"github.com/photoprism/photoprism/internal/service"
|
||||
)
|
||||
|
||||
// InitConfig initializes the command config.
|
||||
var InitConfig = func(ctx *cli.Context) (*config.Config, error) {
|
||||
c := config.NewConfig(ctx)
|
||||
service.SetConfig(c)
|
||||
return c, c.Init()
|
||||
}
|
Reference in New Issue
Block a user