From 4625aa3060840aa7c603c20c6f5f8d7f24ffcb8e Mon Sep 17 00:00:00 2001 From: Dessalines Date: Fri, 26 Apr 2019 09:21:20 -0700 Subject: [PATCH] Spam --- server/src/websocket_server/server.rs | 4 ++-- ui/src/components/login.tsx | 17 +++++++---------- ui/src/css/main.css | 4 +++- ui/src/interfaces.ts | 2 +- 4 files changed, 13 insertions(+), 14 deletions(-) diff --git a/server/src/websocket_server/server.rs b/server/src/websocket_server/server.rs index d6a9226b2..9c609a470 100644 --- a/server/src/websocket_server/server.rs +++ b/server/src/websocket_server/server.rs @@ -92,7 +92,7 @@ pub struct Register { password: String, password_verify: String, admin: bool, - spam_timer: i64, + spam_timeri: i64, } #[derive(Serialize, Deserialize)] @@ -790,7 +790,7 @@ impl Perform for Register { return Err(self.error("Passwords do not match."))? } - if self.spam_timer < 1142 { + if self.spam_timeri < 1142 { return Err(self.error("Too fast"))? } diff --git a/ui/src/components/login.tsx b/ui/src/components/login.tsx index b64c7a7cd..5c0b8dd1d 100644 --- a/ui/src/components/login.tsx +++ b/ui/src/components/login.tsx @@ -27,7 +27,7 @@ export class Login extends Component { password: undefined, password_verify: undefined, admin: false, - spam_timer: undefined, + spam_timeri: undefined, }, loginLoading: false, registerLoading: false, @@ -103,6 +103,7 @@ export class Login extends Component { return (
Sign Up
+
@@ -127,9 +128,7 @@ export class Login extends Component {
- - - +