From: Dessalines Date: Wed, 15 May 2019 16:32:33 +0000 (-0700) Subject: Removing need for spam_timer X-Git-Url: http://these/git/%7B%24%7B%60data:application/%22%7Burl%7D/%7Bthis.state.url%7D?a=commitdiff_plain;h=8820eac129a7830432ca52f41b83d74ee47ccd09;p=lemmy.git Removing need for spam_timer --- diff --git a/docs/api.md b/docs/api.md index 69229c16..032c08aa 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 ab0f24a5..9361ca4d 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 b2ad70a1..33cebdd6 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 {
-