mirror of
https://github.com/zoriya/Kyoo.git
synced 2025-05-24 02:02:36 -04:00
Add default config values
This commit is contained in:
parent
662457d0f1
commit
2b493e6d16
@ -20,6 +20,12 @@ type Configuration struct {
|
||||
ExpirationDelay time.Duration
|
||||
}
|
||||
|
||||
var DefaultConfig = Configuration{
|
||||
Issuer: "kyoo",
|
||||
DefaultClaims: make(jwt.MapClaims),
|
||||
ExpirationDelay: 30 * 24 * time.Hour,
|
||||
}
|
||||
|
||||
const (
|
||||
JwtPrivateKey = "jwt_private_key"
|
||||
)
|
||||
@ -31,7 +37,7 @@ func LoadConfiguration(db *dbc.Queries) (*Configuration, error) {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
ret := Configuration{}
|
||||
ret := DefaultConfig
|
||||
|
||||
for _, conf := range confs {
|
||||
switch conf.Key {
|
||||
|
Loading…
x
Reference in New Issue
Block a user