Fix guild creation, disable registration.
This commit is contained in:
@@ -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 {
|
||||
|
||||
@@ -537,6 +537,7 @@ pub fn create_guild(user: User, info: Json<CreateGuild>) -> Response {
|
||||
"name": name,
|
||||
"description": description,
|
||||
"owner": &user.id,
|
||||
"channels": [ channel_id.clone() ],
|
||||
"invites": [],
|
||||
"bans": [],
|
||||
"default_permissions": 51,
|
||||
|
||||
Reference in New Issue
Block a user