aboutsummaryrefslogtreecommitdiff
path: root/api/api.go
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 /api/api.go
parentb94f3416c1afe6363249b46bf2b299dfe8e4007f (diff)
downloadFront-85545aba62546f219a9c9730945511412a3174ef.tar.gz
Front-85545aba62546f219a9c9730945511412a3174ef.tar.zst
Front-85545aba62546f219a9c9730945511412a3174ef.zip
Password reset.
Diffstat (limited to 'api/api.go')
-rw-r--r--api/api.go16
1 files changed, 16 insertions, 0 deletions
diff --git a/api/api.go b/api/api.go
index 7b7be49..42b9923 100644
--- a/api/api.go
+++ b/api/api.go
@@ -7,6 +7,22 @@ import (
7 "github.com/gin-gonic/gin" 7 "github.com/gin-gonic/gin"
8) 8)
9 9
10var CONFIG Config
11
12type Config struct {
13 JwtSecret string `toml:"jwt_secret"`
14 PasswordResetSecret string `toml:"password_reset_secret"`
15 FreeSMSUser string `toml:"free_sms_user"`
16 FreeSMSPass string `toml:"free_sms_pass"`
17}
18
19func SetConfig(config Config) {
20 CONFIG = config
21
22 JWT_SECRET = []byte(config.JwtSecret)
23 PASSWORD_RESET_SECRET = []byte(config.PasswordResetSecret)
24}
25
10type Error struct { 26type Error struct {
11 Code ErrorCode 27 Code ErrorCode
12 UserMessage string 28 UserMessage string