Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent json files from being pre-emptively parsed when uploading as file #199

Merged
merged 1 commit into from
Aug 18, 2023

Conversation

jujaga
Copy link
Member

@jujaga jujaga commented Aug 18, 2023

Description

We introduce the express-unless library in order to pattern match against the two endpoints createObject and updateObject and ensure that the express.json middleware skips execution on those two endpoints.

SHOWCASE-3322

Types of changes

Bug fix (non-breaking change which fixes an issue)

Checklist

  • I have read the CONTRIBUTING doc
  • I have checked that unit tests pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)

Further comments

…file

We introduce the express-unless library in order to pattern match against
the two endpoints createObject and updateObject and ensure that the
express.json middleware skips execution on those two endpoints.

Signed-off-by: Jeremy Ho <jujaga@gmail.com>
@jujaga jujaga added bug Something isn't working dependencies Pull requests that update a dependency file labels Aug 18, 2023
@jujaga jujaga requested a review from wilwong89 August 18, 2023 21:25
@jujaga jujaga self-assigned this Aug 18, 2023
@github-actions
Copy link

Coverage Report

Totals Coverage
Statements: 52.35% ( 2020 / 3859 )
Methods: 41.37% ( 223 / 539 )
Lines: 58.58% ( 1263 / 2156 )
Branches: 45.88% ( 534 / 1164 )

@codeclimate
Copy link

codeclimate bot commented Aug 18, 2023

Code Climate has analyzed commit affe160 and detected 0 issues on this pull request.

The test coverage on the diff in this pull request is 100.0% (50% is the threshold).

This pull request will bring the total coverage in the repository to 58.5% (0.0% change).

View more on Code Climate.

@norrisng-bc norrisng-bc merged commit e6d661b into master Aug 18, 2023
@jujaga jujaga deleted the bugfix/jsonparsing branch August 18, 2023 23:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants