aboutsummaryrefslogtreecommitdiff
path: root/cmd/app/main.go
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/app/main.go')
-rw-r--r--cmd/app/main.go11
1 files changed, 5 insertions, 6 deletions
diff --git a/cmd/app/main.go b/cmd/app/main.go
index 65e8b5a..a0463d2 100644
--- a/cmd/app/main.go
+++ b/cmd/app/main.go
@@ -21,8 +21,8 @@ type AppConfig struct {
21} 21}
22 22
23type ApiConfig struct { 23type ApiConfig struct {
24 Domain string `toml:"domain"` 24 api.Config
25 JwtSecret string `toml:"jwt_secret"` 25 Domain string `toml:"domain"`
26} 26}
27 27
28type Config struct { 28type Config struct {
@@ -45,9 +45,6 @@ func (c *Config) SetToDefaults() {
45 App: AppConfig{ 45 App: AppConfig{
46 PublicDir: "./public", 46 PublicDir: "./public",
47 }, 47 },
48 Api: ApiConfig{
49 JwtSecret: "secret",
50 },
51 } 48 }
52 49
53 c.LogConfiguration.SetToDefaults() 50 c.LogConfiguration.SetToDefaults()
@@ -63,7 +60,7 @@ func init() {
63 panic(err) 60 panic(err)
64 } 61 }
65 62
66 api.SetJwtSecretKey(C.Api.JwtSecret) 63 api.SetConfig(C.Api.Config)
67 64
68 db.Init(C.Db, C.Redis) 65 db.Init(C.Db, C.Redis)
69 66
@@ -142,6 +139,8 @@ func main() {
142 "/", 139 "/",
143 "/signup", 140 "/signup",
144 "/signin", 141 "/signin",
142 "/reset-password",
143 "/change-password",
145 "/signout", 144 "/signout",
146 "/me", 145 "/me",
147 "/otp/enroll", 146 "/otp/enroll",