Skip to content
Snippets Groups Projects

Add functional version of the middleware that changes the default query based on request body

Merged Leon A. Okida Gonçalves requested to merge issue-843-new-middleware into development
  • The middleware is on src/middlewares/reqBody.js
  • It has the methods parse and add_metrics
  • The method parse processes the body of the HTTP request and calls a method based on its mode. Currently, it only supports the mode add_metrics
  • If the mode is add_metrics, it calls the method add_metrics for each column and its specified operations
  • The method add_metrics adds a field to req.sql for each operation specified to the column and sets the flag req.hasMetrics to true, so that the route knows that it should not create its default query

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
Please register or sign in to reply
Loading