Skip to content

Commit

Permalink
[TECH] Remplacer notre parser de query string par une alternative plu…
Browse files Browse the repository at this point in the history
…s légère

 #9838
  • Loading branch information
pix-service-auto-merge authored Aug 13, 2024
2 parents da6a520 + 9e95ed1 commit 809af3a
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 22 deletions.
2 changes: 1 addition & 1 deletion api/eslint.config.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ module.exports = [
prettier,
{ plugins: { 'chai-expect': fixupPluginRules(chai) } },
n,
{ plugins: { import: fixupPluginRules(_import) } },
{ plugins: { import: _import } },
{ plugins: { knex: fixupPluginRules(knex) } },
{ plugins: { unicorn } },
{
Expand Down
35 changes: 19 additions & 16 deletions api/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
"lodash": "^4.17.21",
"micromatch": "^4.0.5",
"ms": "^2.1.3",
"neoqs": "^6.12.7",
"node-cache": "^5.1.2",
"node-stream-zip": "^1.15.0",
"nodemailer": "^6.9.6",
Expand All @@ -70,7 +71,6 @@
"pg-connection-string": "^2.5.0",
"pino": "^9.0.0",
"pino-pretty": "^11.0.0",
"qs": "6.12.3",
"randomstring": "^1.2.2",
"redlock": "^4.2.0",
"samlify": "^2.8.5",
Expand Down
4 changes: 2 additions & 2 deletions api/server.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Oppsy from '@1024pix/oppsy';
import Hapi from '@hapi/hapi';
import Qs from 'qs';
import { parse } from 'neoqs';

import { setupErrorHandling } from './config/server-setup-error-handling.js';
import { knex } from './db/knex-database-connection.js';
Expand Down Expand Up @@ -95,7 +95,7 @@ const createBareServer = function () {
},
port,
query: {
parser: (query) => Qs.parse(query),
parser: (query) => parse(query),
},
router: {
isCaseSensitive: false,
Expand Down
4 changes: 2 additions & 2 deletions api/tests/tooling/server/http-test-server.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import Hapi from '@hapi/hapi';
import Qs from 'qs';
import { parse } from 'neoqs';

import { setupErrorHandling } from '../../../config/server-setup-error-handling.js';
import { authentication } from '../../../lib/infrastructure/authentication.js';
Expand All @@ -13,7 +13,7 @@ const routesConfig = {
},
},
query: {
parser: (query) => Qs.parse(query),
parser: (query) => parse(query),
},
};

Expand Down

0 comments on commit 809af3a

Please sign in to comment.