mirror of
https://github.com/fumiama/paper-manager.git
synced 2026-06-28 06:40:28 +08:00
finish reset password
This commit is contained in:
@@ -11,13 +11,13 @@ import (
|
||||
var registerlimit = ttl.NewCache[string, bool](time.Minute * 10)
|
||||
|
||||
var (
|
||||
errRegisterTooFast = errors.New("register too fast")
|
||||
errInvalidIP = errors.New("invalid IP")
|
||||
errRequestTooFast = errors.New("request too fast")
|
||||
errInvalidIP = errors.New("invalid IP")
|
||||
)
|
||||
|
||||
func register(ip, name, mobile, npwd string) error {
|
||||
if registerlimit.Get(ip) {
|
||||
return errRegisterTooFast
|
||||
return errRequestTooFast
|
||||
}
|
||||
if ip == "" {
|
||||
return errInvalidIP
|
||||
|
||||
Reference in New Issue
Block a user