Err(_e) => return Err(APIError::err("not_logged_in").into()),
};
+ if !is_valid_community_name(&data.name) {
+ return Err(APIError::err("invalid_community_name").into());
+ }
+
let user_id = claims.id;
let conn = pool.get()?;
"number_of_communities": "{{count}} Community",
"number_of_communities_plural": "{{count}} Communities",
"community_reqs": "lowercase, underscores, and no spaces.",
+ "invalid_community_name": "Invalid name.",
"create_private_message": "Create Private Message",
"send_secure_message": "Send Secure Message",
"send_message": "Send Message",