wip: user stuff
This commit is contained in:
@ -2,6 +2,7 @@ package cmd
|
||||
|
||||
import (
|
||||
"context"
|
||||
"loveuer/utodo/internal/api"
|
||||
"loveuer/utodo/internal/model"
|
||||
"loveuer/utodo/internal/opt"
|
||||
g_api "loveuer/utodo/pkg/api"
|
||||
@ -34,7 +35,7 @@ func svcRun(cmd *cobra.Command, args []string) error {
|
||||
return err
|
||||
}
|
||||
|
||||
if err = model.Init(cmd.Context(), db.Default.Session(tool.Timeout(60))); err != nil {
|
||||
if err = model.Init(cmd.Context(), db.Default.Session(tool.Timeout(60), db.Config{Debug: opt.Cfg.Debug})); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@ -43,6 +44,7 @@ func svcRun(cmd *cobra.Command, args []string) error {
|
||||
g_api.WithAddress(opt.Cfg.Svc.Address),
|
||||
g_api.WithVersion(opt.Cfg.Version),
|
||||
g_api.WithName(opt.Cfg.Name),
|
||||
g_api.WithApp(api.New(cmd.Context())),
|
||||
); err != nil {
|
||||
return err
|
||||
}
|
||||
|
Reference in New Issue
Block a user