parse-community / parse-community/parse-server

Accept default express parameters in middleware function.

Open
#8,428 8 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

type:feature
Dominant language
JavaScript
Stars
21.4k
Forks
4.8k
Avg merge
7h 45m
Merged PRs (30d)
11

Description

Issue Checklist
Issue

Currently, the middleware function does not accept the express default parameters

https://github.com/parse-community/parse-server/blob/4450ecbc01ab72544997f611e56d16878fc347ef/src/Options/index.js#L247-L248

However, the middleware is directly supplied to express in

https://github.com/parse-community/parse-server/blob/4450ecbc01ab72544997f611e56d16878fc347ef/src/ParseServer.js#L302-L310

So we should be able to pass req,res,next parameters

Actual Outcome

Not able to pass the default express parameters req,res,next to the middleware function

Expected Outcome

Should be able to pass req,res,next parameters

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the middleware definition in src/Options/index.js around line 247 and its registration in src/ParseServer.js around lines 302–310. Trace how the middleware is invoked, then verify that Express's req, res, and next parameters are available to it; done means the behavior is covered by the relevant existing tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
express, javascript, node.js
Domain
api, backend
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.