From 67812a1d75070972f648122823954b81b4ba3d47 Mon Sep 17 00:00:00 2001 From: Aditya Siregar Date: Thu, 18 Sep 2025 12:27:03 +0700 Subject: [PATCH] fix login issue --- config/configs.go | 16 ++++++++-------- config/jwt.go | 3 ++- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/config/configs.go b/config/configs.go index 7265f0a..b704bae 100644 --- a/config/configs.go +++ b/config/configs.go @@ -69,6 +69,14 @@ func (c *Config) Auth() *AuthConfig { } } +func (c *Config) GetCustomerJWTSecret() string { + return c.Jwt.Customer.Secret +} + +func (c *Config) GetCustomerJWTExpiresTTL() int { + return c.Jwt.Customer.ExpiresTTL +} + func (c *Config) LogLevel() string { return c.Log.LogLevel } @@ -84,11 +92,3 @@ func (c *Config) LogFormat() string { func (c *Config) GetFonnte() *Fonnte { return &c.Fonnte } - -func (c *Config) GetCustomerJWTSecret() string { - return c.Jwt.Customer.Token.Secret -} - -func (c *Config) GetCustomerJWTExpiresTTL() int { - return c.Jwt.Customer.Token.ExpiresTTL -} diff --git a/config/jwt.go b/config/jwt.go index 2f651bd..d8e9ff6 100644 --- a/config/jwt.go +++ b/config/jwt.go @@ -11,5 +11,6 @@ type Token struct { } type Customer struct { - Token Token `mapstructure:"token"` + ExpiresTTL int `mapstructure:"expires-ttl"` + Secret string `mapstructure:"secret"` }