chore: loosen username restrictions

This commit is contained in:
Paul Makles
2022-05-09 23:03:08 +01:00
parent c59c4146c4
commit d7527d9131
5 changed files with 7 additions and 4 deletions

View File

@@ -28,6 +28,9 @@ pub async fn req(
data: Json<DataChangeUsername>,
) -> Result<Json<User>> {
let data = data.into_inner();
data.validate()
.map_err(|error| Error::FailedValidation { error })?;
account
.verify_password(&data.password)
.map_err(|_| Error::InvalidCredentials)?;