summary refs log tree commit diff
diff options
context:
space:
mode:
authorFlam3rboy <34555296+Flam3rboy@users.noreply.github.com>2021-08-11 19:42:10 +0200
committerFlam3rboy <34555296+Flam3rboy@users.noreply.github.com>2021-08-11 19:42:10 +0200
commita09303d2945cff54433a668427c71b55061f1add (patch)
treec21c33cabf2052bd67fa453b5ea45305f2e56f0d
parent:pencil2: fix RateLimit onlyIp typo (diff)
downloadserver-a09303d2945cff54433a668427c71b55061f1add.tar.xz
:pencil2: fix typo
-rw-r--r--src/routes/auth/login.ts2
-rw-r--r--src/routes/auth/register.ts2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/routes/auth/login.ts b/src/routes/auth/login.ts
index af00a46d..d7c6e833 100644
--- a/src/routes/auth/login.ts
+++ b/src/routes/auth/login.ts
@@ -12,7 +12,7 @@ export default router;
 // TODO: check if user is deleted/restricted
 router.post(
 	"/",
-	RateLimit({ count: 5, window: 60, onylIp: true }),
+	RateLimit({ count: 5, window: 60, onlyIp: true }),
 	check({
 		login: new Length(String, 2, 100), // email or telephone
 		password: new Length(String, 8, 72),
diff --git a/src/routes/auth/register.ts b/src/routes/auth/register.ts
index eb5cd97d..0dd92e16 100644
--- a/src/routes/auth/register.ts
+++ b/src/routes/auth/register.ts
@@ -12,7 +12,7 @@ const router: Router = Router();
 
 router.post(
 	"/",
-	RateLimit({ count: 2, window: 60 * 60 * 12, onylIp: true, success: true }),
+	RateLimit({ count: 2, window: 60 * 60 * 12, onlyIp: true, success: true }),
 	check({
 		username: new Length(String, 2, 32),
 		// TODO: check min password length in config