mirror of
https://github.com/danbulant/Portfolio
synced 2026-06-14 20:11:24 +00:00
feat: return BadRequest if pdf is not valid for now
This commit is contained in:
parent
27a7845b7f
commit
59813041f6
1 changed files with 2 additions and 0 deletions
|
|
@ -26,6 +26,7 @@ impl<'r> FromData<'r> for Letter {
|
|||
|
||||
if !data_bytes.is_complete() {
|
||||
// TODO: Over limit
|
||||
return Outcome::Failure((Status::BadRequest, None))
|
||||
}
|
||||
|
||||
let data_bytes = data_bytes.into_inner();
|
||||
|
|
@ -34,6 +35,7 @@ impl<'r> FromData<'r> for Letter {
|
|||
|
||||
if !is_pdf {
|
||||
// TODO: Not PDF
|
||||
return Outcome::Failure((Status::BadRequest, None))
|
||||
}
|
||||
|
||||
Outcome::Success(Letter(data_bytes))
|
||||
|
|
|
|||
Loading…
Reference in a new issue