feat: support overriding configuration with env (#590)

This commit is contained in:
Товарищ программист
2022-03-20 23:21:09 +08:00
committed by GitHub
parent 1a6d98d029
commit 5f8924ed4e
21 changed files with 173 additions and 38 deletions

View File

@ -20,7 +20,7 @@ import (
"math/rand"
"time"
"github.com/astaxie/beego"
"github.com/casdoor/casdoor/conf"
"github.com/casdoor/casdoor/util"
"xorm.io/core"
)
@ -129,7 +129,7 @@ func CheckVerificationCode(dest, code string) string {
return "Code has not been sent yet!"
}
timeout, err := beego.AppConfig.Int64("verificationCodeTimeout")
timeout, err := conf.GetConfigInt64("verificationCodeTimeout")
if err != nil {
panic(err)
}