Push env variables to rAuth + cargo fmt.

This commit is contained in:
Paul Makles
2021-01-26 17:29:03 +00:00
parent abd8b1821d
commit 23ec2d61f1
10 changed files with 94 additions and 56 deletions

View File

@@ -70,7 +70,7 @@ pub async fn req(user: User, info: Json<Data>) -> Result<JsonValue> {
.unwrap_or_else(|| "A group.".to_string()),
owner: user.id,
recipients: set.into_iter().collect::<Vec<String>>(),
last_message: None
last_message: None,
};
channel.clone().publish().await?;

View File

@@ -27,7 +27,7 @@ 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)?
}

View File

@@ -40,7 +40,7 @@ pub async fn req(user: User, target: Ref) -> Result<JsonValue> {
id,
active: false,
recipients: vec![user.id, target.id],
last_message: None
last_message: None,
}
};