mirror of
https://github.com/danbulant/Portfolio
synced 2026-06-20 23:11:03 +00:00
feat: return BadRequest if zip is not valid for now
This commit is contained in:
parent
59813041f6
commit
1ad95f21f9
1 changed files with 2 additions and 0 deletions
|
|
@ -26,6 +26,7 @@ impl<'r> FromData<'r> for Portfolio {
|
|||
|
||||
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 Portfolio {
|
|||
|
||||
if !is_zip {
|
||||
// TODO: Not ZIP
|
||||
return Outcome::Failure((Status::BadRequest, None))
|
||||
}
|
||||
|
||||
Outcome::Success(Portfolio(data_bytes))
|
||||
|
|
|
|||
Loading…
Reference in a new issue