From db5b0a951e77d08af3b9a762f14a5b26e73740bf Mon Sep 17 00:00:00 2001 From: Dessalines Date: Wed, 15 May 2019 09:32:33 -0700 Subject: [PATCH] Removing need for spam_timer --- docs/api.md | 3 +-- server/src/api/user.rs | 5 ----- ui/src/components/login.tsx | 21 +-------------------- ui/src/components/setup.tsx | 1 - ui/src/interfaces.ts | 1 - 5 files changed, 2 insertions(+), 29 deletions(-) diff --git a/docs/api.md b/docs/api.md index 69229c167..032c08aa5 100644 --- a/docs/api.md +++ b/docs/api.md @@ -68,8 +68,7 @@ Only the first user will be able to be the admin. email: Option, password: String, password_verify: String, - admin: bool, - spam_timeri: i64, + admin: bool } } ``` diff --git a/server/src/api/user.rs b/server/src/api/user.rs index ab0f24a5a..9361ca4d8 100644 --- a/server/src/api/user.rs +++ b/server/src/api/user.rs @@ -15,7 +15,6 @@ pub struct Register { password: String, password_verify: String, admin: bool, - spam_timeri: i64, } #[derive(Serialize, Deserialize)] @@ -133,10 +132,6 @@ impl Perform for Oper { return Err(APIError::err(&self.op, "Passwords do not match."))? } - if data.spam_timeri < 1142 { - return Err(APIError::err(&self.op, "Too fast"))? - } - if has_slurs(&data.username) { return Err(APIError::err(&self.op, "No slurs"))? } diff --git a/ui/src/components/login.tsx b/ui/src/components/login.tsx index b2ad70a16..33cebdd62 100644 --- a/ui/src/components/login.tsx +++ b/ui/src/components/login.tsx @@ -10,7 +10,6 @@ interface State { registerForm: RegisterForm; loginLoading: boolean; registerLoading: boolean; - spamNada: string; } @@ -27,11 +26,9 @@ export class Login extends Component { password: undefined, password_verify: undefined, admin: false, - spam_timeri: undefined, }, loginLoading: false, registerLoading: false, - spamNada: undefined } constructor(props: any, context: any) { @@ -103,7 +100,6 @@ export class Login extends Component { return (
Sign Up
-
@@ -128,7 +124,6 @@ export class Login extends Component {
-