refactor: since Portal.Logger can return a temporary logger, just use it

This commit is contained in:
Derrick Hammer 2024-01-15 22:44:28 -05:00
parent a8a39d523e
commit 212832eda1
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
2 changed files with 4 additions and 4 deletions

View File

@ -13,7 +13,7 @@ import (
type initFunc func(p interfaces.Portal) error
func initConfig(p interfaces.Portal) error {
return config.Init()
return config.Init(p)
}
func initIdentity(p interfaces.Portal) error {

View File

@ -2,8 +2,8 @@ package config
import (
"errors"
"git.lumeweb.com/LumeWeb/portal/interfaces"
"github.com/spf13/viper"
"go.uber.org/zap"
)
var (
@ -14,8 +14,8 @@ var (
}
)
func Init() error {
logger, _ := zap.NewDevelopment()
func Init(p interfaces.Portal) error {
logger := p.Logger()
viper.SetConfigName("config")
viper.SetConfigType("yaml")