mirror of
https://github.com/zoriya/Kyoo.git
synced 2025-06-01 20:54:13 -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
|
ExpirationDelay time.Duration
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var DefaultConfig = Configuration{
|
||||||
|
Issuer: "kyoo",
|
||||||
|
DefaultClaims: make(jwt.MapClaims),
|
||||||
|
ExpirationDelay: 30 * 24 * time.Hour,
|
||||||
|
}
|
||||||
|
|
||||||
const (
|
const (
|
||||||
JwtPrivateKey = "jwt_private_key"
|
JwtPrivateKey = "jwt_private_key"
|
||||||
)
|
)
|
||||||
@ -31,7 +37,7 @@ func LoadConfiguration(db *dbc.Queries) (*Configuration, error) {
|
|||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
ret := Configuration{}
|
ret := DefaultConfig
|
||||||
|
|
||||||
for _, conf := range confs {
|
for _, conf := range confs {
|
||||||
switch conf.Key {
|
switch conf.Key {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user