tsk-3: Add Token support (#10)

Closes #3

Reviewed-on: phoenix/textsender-api#10
Co-authored-by: phoenix <kundeng00@pm.me>
Co-committed-by: phoenix <kundeng00@pm.me>
This commit is contained in:
phoenix
2025-11-04 17:51:35 +00:00
committed by phoenix
parent 96fc87ea5e
commit d332cde84f
8 changed files with 113 additions and 4 deletions
+2
View File
@@ -16,6 +16,7 @@ type Config struct {
DBConnString string
ServerPort string
ResetDB bool
JWTSecret string `env:"JWT_SECRET" required:"true"`
}
type ConnectionInfo struct {
@@ -68,6 +69,7 @@ func Load() *Config {
DBConnString: dbConnString,
ServerPort: *port,
ResetDB: *resetDb,
JWTSecret: os.Getenv("JWT_SECRET"),
}
}