chore(refactor): validate further up the code

This commit is contained in:
Paul Makles
2022-06-08 14:14:16 +01:00
parent 0abc12e5fa
commit 2051c8ce45
3 changed files with 5 additions and 9 deletions

View File

@@ -138,10 +138,6 @@ pub async fn message_send(
let mut embeds = vec![];
if let Some(sendable_embeds) = data.embeds {
for sendable_embed in sendable_embeds {
sendable_embed
.validate()
.map_err(|error| Error::FailedValidation { error })?;
embeds.push(sendable_embed.into_embed(db, message_id.clone()).await?)
}
}