In instance.go GetExpireInterval() changed to GetExpiry(). And changed name of corresponding field of CaptchaDB to ExpireIn.
This commit is contained in:
parent
bb4b3bd1ba
commit
3251b68629
@ -8,8 +8,8 @@ import (
|
|||||||
var captchaDb CaptchaDB = CaptchaDB{
|
var captchaDb CaptchaDB = CaptchaDB{
|
||||||
DB: make(map[ID]ICaptcha)}
|
DB: make(map[ID]ICaptcha)}
|
||||||
|
|
||||||
func Init(expiration time.Duration) {
|
func Init(expiry time.Duration) {
|
||||||
captchaDb.SetExpiration(expiration)
|
captchaDb.SetExpiry(expiry)
|
||||||
}
|
}
|
||||||
|
|
||||||
func New(data string, captcha ICaptcha) (ICaptcha, ID) {
|
func New(data string, captcha ICaptcha) (ICaptcha, ID) {
|
||||||
@ -28,6 +28,6 @@ func IsSolved(id ID) (bool, error) {
|
|||||||
return captchaDb.IsSolved(id)
|
return captchaDb.IsSolved(id)
|
||||||
}
|
}
|
||||||
|
|
||||||
func GetExpireInterval() time.Duration {
|
func GetExpiry() time.Duration {
|
||||||
return captchaDb.ExpireInterval
|
return captchaDb.ExpireIn
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user