diff --git a/internal/captcha/db.go b/internal/captcha/db.go index 14df7f8..7342cbf 100644 --- a/internal/captcha/db.go +++ b/internal/captcha/db.go @@ -17,6 +17,7 @@ type ICaptchaDB interface { Image(id ID) (*image.Image, error) Solve(id ID, answer Answer) (bool, error) IsSolved(id ID) bool + GetExpireInterval() time.Duration } type CaptchaDB struct { @@ -102,3 +103,7 @@ func (cdb *CaptchaDB) IsSolved(id ID) (bool, error) { } return false, errorNotFound } + +func (cdb *CaptchaDB) GetExpireInterval() time.Duration { + return cdb.ExpireInterval +}