Skip to content

Commit

Permalink
fix: /files endpoint, no files status (#815)
Browse files Browse the repository at this point in the history
  • Loading branch information
kennylavender authored Nov 26, 2018
1 parent f960fab commit 98c9eb5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/API/Router.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ export class Router {
const files = context.request.files || {}

if (values(files).length <= 0)
context.throw(400, 'No file found.')
context.throw(422, 'No file found.')

const responses = await this.fileController.addFiles(map(createStreamFromFile, values(files)))

Expand Down
4 changes: 2 additions & 2 deletions tests/integration/API/PostFile.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,9 @@ describe('POST /files', async assert => {

assert({
given,
should: 'return status of 400',
should: 'return status of 422',
actual: view(status, response),
expected: 400,
expected: 422,
})

assert({
Expand Down

0 comments on commit 98c9eb5

Please sign in to comment.