Skip to content
Snippets Groups Projects
Commit cb882ce1 authored by insert's avatar insert
Browse files

Block @revolt from being registered.

parent 5486a68b
No related merge requests found
...@@ -27,6 +27,10 @@ pub async fn req(session: Session, user: Option<User>, data: Json<Data>) -> Resu ...@@ -27,6 +27,10 @@ pub async fn req(session: Session, user: Option<User>, data: Json<Data>) -> Resu
data.validate() data.validate()
.map_err(|error| Error::FailedValidation { error })?; .map_err(|error| Error::FailedValidation { error })?;
if data.username == "revolt" {
Err(Error::UsernameTaken)?
}
let col = get_collection("users"); let col = get_collection("users");
if col if col
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment