forked from jmug/stoatchat
Block @revolt from being registered.
This commit is contained in:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user