aboutsummaryrefslogtreecommitdiff
path: root/cmd/app
diff options
context:
space:
mode:
authorjloup <jeanloup.jamet@gmail.com>2018-05-04 11:55:15 +0200
committerjloup <jeanloup.jamet@gmail.com>2018-05-04 11:55:15 +0200
commit85545aba62546f219a9c9730945511412a3174ef (patch)
tree7bf7feb99c6e7e51e83c386aafb3da3b7610d6bd /cmd/app
parentb94f3416c1afe6363249b46bf2b299dfe8e4007f (diff)
downloadFront-85545aba62546f219a9c9730945511412a3174ef.tar.gz
Front-85545aba62546f219a9c9730945511412a3174ef.tar.zst
Front-85545aba62546f219a9c9730945511412a3174ef.zip
Password reset.
Diffstat (limited to 'cmd/app')
-rw-r--r--cmd/app/conf.toml3
-rw-r--r--cmd/app/main.go11
2 files changed, 8 insertions, 6 deletions
diff --git a/cmd/app/conf.toml b/cmd/app/conf.toml
index 13e3e0b..16087e5 100644
--- a/cmd/app/conf.toml
+++ b/cmd/app/conf.toml
@@ -16,6 +16,9 @@ database=0
16[api] 16[api]
17domain="localhost" 17domain="localhost"
18jwt_secret="secret" 18jwt_secret="secret"
19password_reset_secret="resetsecret"
20free_sms_user="20996747"
21free_sms_pass="bM2ZPETB4zzWg3"
19 22
20[app] 23[app]
21public_dir="../web/build/static" 24public_dir="../web/build/static"
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",