diff --git a/install.sh b/install.sh index a06681f27..071acc6fb 100755 --- a/install.sh +++ b/install.sh @@ -1,6 +1,8 @@ #!/bin/sh set -e +export DATABASE_URL=postgres://rrr:rrr@localhost/rrr + cd ui yarn yarn build diff --git a/server/Cargo.toml b/server/Cargo.toml index 93bd6acb2..1daaca663 100644 --- a/server/Cargo.toml +++ b/server/Cargo.toml @@ -2,6 +2,7 @@ name = "server" version = "0.0.1" authors = ["Dessalines "] +autobins = false [[bin]] name = "lemmy" diff --git a/server/src/websocket_server/server.rs b/server/src/websocket_server/server.rs index dbd1be8d5..9c609a470 100644 --- a/server/src/websocket_server/server.rs +++ b/server/src/websocket_server/server.rs @@ -92,6 +92,7 @@ pub struct Register { password: String, password_verify: String, admin: bool, + spam_timeri: i64, } #[derive(Serialize, Deserialize)] @@ -789,6 +790,10 @@ impl Perform for Register { return Err(self.error("Passwords do not match."))? } + if self.spam_timeri < 1142 { + return Err(self.error("Too fast"))? + } + if has_slurs(&self.username) { return Err(self.error("No slurs"))? } diff --git a/ui/src/components/communities.tsx b/ui/src/components/communities.tsx index 383440079..b5233c222 100644 --- a/ui/src/components/communities.tsx +++ b/ui/src/components/communities.tsx @@ -33,7 +33,7 @@ export class Communities extends Component { let listCommunitiesForm: ListCommunitiesForm = { sort: SortType[SortType.TopAll], - limit: 9999, + limit: 100, } WebSocketService.Instance.listCommunities(listCommunitiesForm); diff --git a/ui/src/components/community-form.tsx b/ui/src/components/community-form.tsx index 66071a3fa..5effa73ae 100644 --- a/ui/src/components/community-form.tsx +++ b/ui/src/components/community-form.tsx @@ -120,7 +120,10 @@ export class CommunityForm extends Component { password: undefined, password_verify: undefined, admin: false, + spam_timeri: undefined, }, loginLoading: false, - registerLoading: false + registerLoading: false, + spamNada: undefined } constructor(props: any, context: any) { @@ -100,6 +103,7 @@ export class Login extends Component { return (
Sign Up
+
@@ -124,6 +128,7 @@ export class Login extends Component {
+