Fix guild creation, disable registration.

This commit is contained in:
Paul Makles
2020-08-25 08:50:25 +01:00
parent 49044d7796
commit 81111c5937
3 changed files with 8 additions and 1 deletions

View File

@@ -36,6 +36,12 @@ pub fn create(info: Json<Create>) -> Response {
);
}
if true {
return Response::BadRequest(
json!({ "error": "Registration disabled." })
);
}
let col = database::get_collection("users");
if info.username.len() < 2 || info.username.len() > 32 {