mirror of
https://github.com/stoatchat/stoatchat.git
synced 2026-07-14 05:26:59 +00:00
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()
|
||||
.map_err(|error| Error::FailedValidation { error })?;
|
||||
|
||||
if data.username == "revolt" {
|
||||
Err(Error::UsernameTaken)?
|
||||
}
|
||||
|
||||
let col = get_collection("users");
|
||||
if col
|
||||
|
||||
Reference in New Issue
Block a user