From 9ebb4cd796af42e1bbc28b809ab92677f5566730 Mon Sep 17 00:00:00 2001 From: Mehul Antony Date: Sat, 7 Feb 2026 20:08:48 -0600 Subject: [PATCH 1/5] refactored code in bulk.js --- bin/rerum_v1.js | 3 ++ controllers/bulk.js | 104 ++++++++++++++++++++++--------------------- package-lock.json | 1 - routes/api-routes.js | 6 +-- 4 files changed, 60 insertions(+), 54 deletions(-) diff --git a/bin/rerum_v1.js b/bin/rerum_v1.js index 8b269269..34ba5d42 100644 --- a/bin/rerum_v1.js +++ b/bin/rerum_v1.js @@ -18,6 +18,8 @@ dotenv.config() const port = process.env.PORT ?? 3001 app.set('port', port) + + /** * Create HTTP server. */ @@ -74,3 +76,4 @@ function onListening() { : 'port ' + addr.port debug('Listening on ' + bind) } + diff --git a/controllers/bulk.js b/controllers/bulk.js index 35e7fcb5..3a491625 100644 --- a/controllers/bulk.js +++ b/controllers/bulk.js @@ -10,43 +10,63 @@ import { newID, isValidID, db } from '../database/index.js' import utils from '../utils.js' import { _contextid, ObjectID, createExpressError, getAgentClaim, parseDocumentID, idNegotiation } from './utils.js' -/** - * Create many objects at once with the power of MongoDB bulkWrite() operations. - * - * @see https://www.mongodb.com/docs/manual/reference/method/db.collection.bulkWrite/ - */ -const bulkCreate = async function (req, res, next) { +//Helper function to standardize JSON responses +function setJsonHeaders(res) { res.set("Content-Type", "application/json; charset=utf-8") +} + +//Helper function for express errors +function fail(next, message, status = 400) { + const err = { message, status } + next(createExpressError(err)) +} + +//function to validate request body is a non-empty array +function requireNonEmptyArrayBody(req, next) { const documents = req.body - let err = {} if (!Array.isArray(documents)) { - err.message = "The request body must be an array of objects." - err.status = 400 - next(createExpressError(err)) - return + fail(next, "The request body must be an array of objects.", 400) + return null } if (documents.length === 0) { - err.message = "No action on an empty array." - err.status = 400 - next(createExpressError(err)) - return + fail(next, "No action on an empty array.", 400) + return null + } + return documents +} + +//check if an item is valid JSON object (not array) +function isValidJsonObject(d) { + if (d == null || Array.isArray(d) || typeof d !== "object") return false + try { + JSON.parse(JSON.stringify(d)) + } catch (err) { + return false } + return true +} + +/** + * Create many objects at once with the power of MongoDB bulkWrite() operations. + * + * @see https://www.mongodb.com/docs/manual/reference/method/db.collection.bulkWrite/ + */ +const bulkCreate = async function (req, res, next) { + setJsonHeaders(res) + + const documents = requireNonEmptyArrayBody(req, next) + if (!documents) return + const gatekeep = documents.filter(d=> { // Each item must be valid JSON, but can't be an array. - if(Array.isArray(d) || typeof d !== "object") return d - try { - JSON.parse(JSON.stringify(d)) - } catch (err) { - return d - } + if (!isValidJsonObject(d)) return d + // Items must not have an @id, and in some cases same for id. const idcheck = _contextid(d["@context"]) ? (d.id ?? d["@id"]) : d["@id"] if(idcheck) return d }) if (gatekeep.length > 0) { - err.message = "All objects in the body of a `/bulkCreate` must be JSON and must not contain a declared identifier property." - err.status = 400 - next(createExpressError(err)) + fail(next, "All objects in the body of a `/bulkCreate` must be JSON and must not contain a declared identifier property.", 400) return } @@ -80,7 +100,7 @@ const bulkCreate = async function (req, res, next) { } try { let dbResponse = await db.bulkWrite(bulkOps, {'ordered':false}) - res.set("Content-Type", "application/json; charset=utf-8") + setJsonHeaders(res) res.set("Link",dbResponse.result.insertedIds.map(r => `${process.env.RERUM_ID_PREFIX}${r._id}`)) // https://www.rfc-editor.org/rfc/rfc5988 res.status(201) const estimatedResults = bulkOps.map(f=>{ @@ -104,39 +124,23 @@ const bulkCreate = async function (req, res, next) { * @see https://www.mongodb.com/docs/manual/reference/method/db.collection.bulkWrite/ */ const bulkUpdate = async function (req, res, next) { - res.set("Content-Type", "application/json; charset=utf-8") - const documents = req.body - let err = {} + setJsonHeaders(res) + + const documents = requireNonEmptyArrayBody(req, next) + if (!documents) return + let encountered = [] - if (!Array.isArray(documents)) { - err.message = "The request body must be an array of objects." - err.status = 400 - next(createExpressError(err)) - return - } - if (documents.length === 0) { - err.message = "No action on an empty array." - err.status = 400 - next(createExpressError(err)) - return - } + const gatekeep = documents.filter(d => { // Each item must be valid JSON, but can't be an array. - if(Array.isArray(d) || typeof d !== "object") return d - try { - JSON.parse(JSON.stringify(d)) - } catch (err) { - return d - } + if (!isValidJsonObject(d)) return d // Items must have an @id, or in some cases an id will do const idcheck = _contextid(d["@context"]) ? (d.id ?? d["@id"]) : d["@id"] if(!idcheck) return d }) // The empty {}s will cause this error if (gatekeep.length > 0) { - err.message = "All objects in the body of a `/bulkUpdate` must be JSON and must contain a declared identifier property." - err.status = 400 - next(createExpressError(err)) + fail(next, "All objects in the body of a `/bulkUpdate` must be JSON and must contain a declared identifier property.", 400) return } // unordered bulkWrite() operations have better performance metrics. @@ -184,7 +188,7 @@ const bulkUpdate = async function (req, res, next) { } try { let dbResponse = await db.bulkWrite(bulkOps, {'ordered':false}) - res.set("Content-Type", "application/json; charset=utf-8") + setJsonHeaders(res) res.set("Link", dbResponse.result.insertedIds.map(r => `${process.env.RERUM_ID_PREFIX}${r._id}`)) // https://www.rfc-editor.org/rfc/rfc5988 res.status(200) const estimatedResults = bulkOps.filter(f=>f.insertOne).map(f=>{ diff --git a/package-lock.json b/package-lock.json index c5f495e3..a3066c23 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4122,7 +4122,6 @@ "version": "7.0.0", "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-7.0.0.tgz", "integrity": "sha512-vG/A5cQrvGGvZm2mTnCSz1LUcbOPl83hfB6bxULKQ8oFZauyox/2xbZOoGNl+64m8VBrETkdGCDBdOsCr3F3jg==", - "license": "Apache-2.0", "dependencies": { "@mongodb-js/saslprep": "^1.3.0", "bson": "^7.0.0", diff --git a/routes/api-routes.js b/routes/api-routes.js index e5cdc743..a11db8c7 100644 --- a/routes/api-routes.js +++ b/routes/api-routes.js @@ -46,9 +46,9 @@ import sinceRouter from './since.js'; import historyRouter from './history.js'; router.use(staticRouter) -router.use('/id',idRouter) -router.use('/api', compatabilityRouter) -router.use('/api/query', queryRouter) +router.use('/id',idRouter)//skip +router.use('/api', compatabilityRouter)//skip +router.use('/api/query', queryRouter)//skip router.use('/api/search', searchRouter) router.use('/api/create', createRouter) router.use('/api/bulkCreate', bulkCreateRouter) From f0ec3e2cb256a10f50b90c75196848c945174779 Mon Sep 17 00:00:00 2001 From: Mehul Antony Date: Thu, 26 Feb 2026 13:19:13 -0600 Subject: [PATCH 2/5] fixed failing tests --- controllers/bulk.js | 68 ++++++++++++++--------------- routes/__tests__/bulkCreate.test.js | 2 +- routes/__tests__/delete.test.js | 2 +- routes/__tests__/set.test.js | 2 +- routes/__tests__/since.test.js | 2 +- routes/__tests__/update.test.js | 2 +- 6 files changed, 38 insertions(+), 40 deletions(-) diff --git a/controllers/bulk.js b/controllers/bulk.js index 3a491625..a58beb7d 100644 --- a/controllers/bulk.js +++ b/controllers/bulk.js @@ -10,40 +10,31 @@ import { newID, isValidID, db } from '../database/index.js' import utils from '../utils.js' import { _contextid, ObjectID, createExpressError, getAgentClaim, parseDocumentID, idNegotiation } from './utils.js' -//Helper function to standardize JSON responses +/** + * Sets standard JSON response headers on the Express response object. + * @param {import('express').Response} res - Express response object + */ function setJsonHeaders(res) { res.set("Content-Type", "application/json; charset=utf-8") } -//Helper function for express errors -function fail(next, message, status = 400) { - const err = { message, status } - next(createExpressError(err)) -} //function to validate request body is a non-empty array -function requireNonEmptyArrayBody(req, next) { +function requireNonEmptyArrayBody(req) { const documents = req.body if (!Array.isArray(documents)) { - fail(next, "The request body must be an array of objects.", 400) - return null + throw { message: "The request body must be an array of objects.", status: 400 } } if (documents.length === 0) { - fail(next, "No action on an empty array.", 400) - return null + throw { message: "No action on an empty array.", status: 400 } } return documents } + //check if an item is valid JSON object (not array) function isValidJsonObject(d) { - if (d == null || Array.isArray(d) || typeof d !== "object") return false - try { - JSON.parse(JSON.stringify(d)) - } catch (err) { - return false - } - return true + return d !== null && typeof d === "object" && !Array.isArray(d) } /** @@ -54,8 +45,12 @@ function isValidJsonObject(d) { const bulkCreate = async function (req, res, next) { setJsonHeaders(res) - const documents = requireNonEmptyArrayBody(req, next) - if (!documents) return + let documents + try { + documents = requireNonEmptyArrayBody(req) + } catch (err) { + return next(createExpressError(err)) + } const gatekeep = documents.filter(d=> { // Each item must be valid JSON, but can't be an array. @@ -66,8 +61,10 @@ const bulkCreate = async function (req, res, next) { if(idcheck) return d }) if (gatekeep.length > 0) { - fail(next, "All objects in the body of a `/bulkCreate` must be JSON and must not contain a declared identifier property.", 400) - return + return next(createExpressError({ + message: "All objects in the body of a `/bulkCreate` must be JSON and must not contain a declared identifier property.", + status: 400 + })) } // TODO: bulkWrite SLUGS? Maybe assign an id to each document and then use that to create the slug? @@ -100,7 +97,6 @@ const bulkCreate = async function (req, res, next) { } try { let dbResponse = await db.bulkWrite(bulkOps, {'ordered':false}) - setJsonHeaders(res) res.set("Link",dbResponse.result.insertedIds.map(r => `${process.env.RERUM_ID_PREFIX}${r._id}`)) // https://www.rfc-editor.org/rfc/rfc5988 res.status(201) const estimatedResults = bulkOps.map(f=>{ @@ -126,22 +122,26 @@ const bulkCreate = async function (req, res, next) { const bulkUpdate = async function (req, res, next) { setJsonHeaders(res) - const documents = requireNonEmptyArrayBody(req, next) - if (!documents) return + let documents + try { + documents = requireNonEmptyArrayBody(req) + } catch (err) { + return next(createExpressError(err)) + } - let encountered = [] const gatekeep = documents.filter(d => { - // Each item must be valid JSON, but can't be an array. - if (!isValidJsonObject(d)) return d - // Items must have an @id, or in some cases an id will do + if (!isValidJsonObject(d)) return true const idcheck = _contextid(d["@context"]) ? (d.id ?? d["@id"]) : d["@id"] - if(!idcheck) return d + if (idcheck) return true + return false }) // The empty {}s will cause this error if (gatekeep.length > 0) { - fail(next, "All objects in the body of a `/bulkUpdate` must be JSON and must contain a declared identifier property.", 400) - return + return next(createExpressError({ + message: "All objects in the body of a `/bulkCreate` must be JSON and must not contain a declared identifier property.", + status: 400 + })) } // unordered bulkWrite() operations have better performance metrics. let bulkOps = [] @@ -150,8 +150,7 @@ const bulkUpdate = async function (req, res, next) { // We know it has an id const idReceived = objectReceived["@id"] ?? objectReceived.id // Update the same thing twice? can vs should. - // if(encountered.includes(idReceived)) continue - encountered.push(idReceived) + if(!idReceived.includes(process.env.RERUM_ID_PREFIX)) continue let id = parseDocumentID(idReceived) let originalObject @@ -188,7 +187,6 @@ const bulkUpdate = async function (req, res, next) { } try { let dbResponse = await db.bulkWrite(bulkOps, {'ordered':false}) - setJsonHeaders(res) res.set("Link", dbResponse.result.insertedIds.map(r => `${process.env.RERUM_ID_PREFIX}${r._id}`)) // https://www.rfc-editor.org/rfc/rfc5988 res.status(200) const estimatedResults = bulkOps.filter(f=>f.insertOne).map(f=>{ diff --git a/routes/__tests__/bulkCreate.test.js b/routes/__tests__/bulkCreate.test.js index 917cc7e6..7ce75173 100644 --- a/routes/__tests__/bulkCreate.test.js +++ b/routes/__tests__/bulkCreate.test.js @@ -33,4 +33,4 @@ it("'/bulkCreate' route functions", async () => { expect(response.headers["date"]).toBeTruthy() expect(response.headers["etag"]).toBeTruthy() expect(response.headers["link"]).toBeTruthy() -}) +}, 20000) diff --git a/routes/__tests__/delete.test.js b/routes/__tests__/delete.test.js index ac012840..d4d0e16d 100644 --- a/routes/__tests__/delete.test.js +++ b/routes/__tests__/delete.test.js @@ -37,4 +37,4 @@ it("'/delete' route functions", async () => { .then(resp => resp) .catch(err => err) expect(response.statusCode).toBe(204) -}) +}, 20000) diff --git a/routes/__tests__/set.test.js b/routes/__tests__/set.test.js index 1559356c..e69dfb7e 100644 --- a/routes/__tests__/set.test.js +++ b/routes/__tests__/set.test.js @@ -39,4 +39,4 @@ it("'/set' route functions", async () => { expect(response.headers["etag"]).toBeTruthy() expect(response.headers["allow"]).toBeTruthy() expect(response.headers["link"]).toBeTruthy() -}) +}, 20000) diff --git a/routes/__tests__/since.test.js b/routes/__tests__/since.test.js index 13f9579f..157a1872 100644 --- a/routes/__tests__/since.test.js +++ b/routes/__tests__/since.test.js @@ -26,4 +26,4 @@ it("'/since/:id' route functions", async () => { expect(response.headers["allow"]).toBeTruthy() expect(response.headers["link"]).toBeTruthy() expect(Array.isArray(response.body)).toBe(true) -}) \ No newline at end of file +}, 20000) \ No newline at end of file diff --git a/routes/__tests__/update.test.js b/routes/__tests__/update.test.js index df5e21a3..593c9332 100644 --- a/routes/__tests__/update.test.js +++ b/routes/__tests__/update.test.js @@ -40,4 +40,4 @@ it("'/update' route functions", async () => { expect(response.headers["allow"]).toBeTruthy() expect(response.headers["link"]).toBeTruthy() -}) +}, 20000) From e7bf99a7d336b5f59f86b50e7976dd4dce35c582 Mon Sep 17 00:00:00 2001 From: Mehul Antony Date: Tue, 3 Mar 2026 15:22:55 -0600 Subject: [PATCH 3/5] fixed failing tests --- routes/__tests__/history.test.js | 2 +- routes/__tests__/patch.test.js | 2 +- routes/__tests__/unset.test.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/routes/__tests__/history.test.js b/routes/__tests__/history.test.js index c4c87b22..9a6c7957 100644 --- a/routes/__tests__/history.test.js +++ b/routes/__tests__/history.test.js @@ -27,4 +27,4 @@ it("'/history/:id' route functions", async () => { expect(response.headers["allow"]).toBeTruthy() expect(response.headers["link"]).toBeTruthy() expect(Array.isArray(response.body)).toBe(true) -}) +}, 20000) diff --git a/routes/__tests__/patch.test.js b/routes/__tests__/patch.test.js index a4d9ebc1..1243d09a 100644 --- a/routes/__tests__/patch.test.js +++ b/routes/__tests__/patch.test.js @@ -37,4 +37,4 @@ it("'/patch' route functions", async () => { expect(response.headers["allow"]).toBeTruthy() expect(response.headers["link"]).toBeTruthy() -}) +}, 20000) diff --git a/routes/__tests__/unset.test.js b/routes/__tests__/unset.test.js index e3c8c97c..ee3fc0d4 100644 --- a/routes/__tests__/unset.test.js +++ b/routes/__tests__/unset.test.js @@ -37,5 +37,5 @@ it("'/unset' route functions", async () => { expect(response.headers["etag"]).toBeTruthy() expect(response.headers["allow"]).toBeTruthy() expect(response.headers["link"]).toBeTruthy() -}) +}, 20000) From 3b40ce155596c25eccbc5c8fc68884241b3e7ad7 Mon Sep 17 00:00:00 2001 From: Mehul Antony Date: Tue, 10 Mar 2026 16:52:02 -0500 Subject: [PATCH 4/5] fixed all issues --- bin/rerum_v1.js | 3 --- controllers/bulk.js | 8 ++++---- package-lock.json | 1 + routes/__tests__/bulkCreate.test.js | 2 +- routes/__tests__/delete.test.js | 2 +- routes/__tests__/history.test.js | 2 +- routes/__tests__/patch.test.js | 2 +- routes/__tests__/set.test.js | 2 +- routes/__tests__/since.test.js | 2 +- routes/__tests__/unset.test.js | 2 +- routes/__tests__/update.test.js | 2 +- routes/api-routes.js | 6 +++--- 12 files changed, 16 insertions(+), 18 deletions(-) diff --git a/bin/rerum_v1.js b/bin/rerum_v1.js index f7b148c3..c81dcaf9 100644 --- a/bin/rerum_v1.js +++ b/bin/rerum_v1.js @@ -16,9 +16,6 @@ import config from '../config/index.js' const port = config.PORT ?? 3001 app.set('port', port) - - - /** * Create HTTP server. */ diff --git a/controllers/bulk.js b/controllers/bulk.js index 0f777b92..ac6d4eb7 100644 --- a/controllers/bulk.js +++ b/controllers/bulk.js @@ -131,17 +131,17 @@ const bulkUpdate = async function (req, res, next) { return next(createExpressError(err)) } - + let encountered = [] const gatekeep = documents.filter(d => { - if (!isValidJsonObject(d)) return true + if (!isValidJsonObject(d)) return true const idcheck = _contextid(d["@context"]) ? (d.id ?? d["@id"]) : d["@id"] - if (idcheck) return true + if (!idcheck) return true // Reject items WITHOUT an id (updates need an id) return false }) // The empty {}s will cause this error if (gatekeep.length > 0) { return next(createExpressError({ - message: "All objects in the body of a `/bulkCreate` must be JSON and must not contain a declared identifier property.", + message: "All objects in the body of a `/bulkUpdate` must be JSON and must contain a declared identifier property.", status: 400 })) } diff --git a/package-lock.json b/package-lock.json index a3066c23..c5f495e3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4122,6 +4122,7 @@ "version": "7.0.0", "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-7.0.0.tgz", "integrity": "sha512-vG/A5cQrvGGvZm2mTnCSz1LUcbOPl83hfB6bxULKQ8oFZauyox/2xbZOoGNl+64m8VBrETkdGCDBdOsCr3F3jg==", + "license": "Apache-2.0", "dependencies": { "@mongodb-js/saslprep": "^1.3.0", "bson": "^7.0.0", diff --git a/routes/__tests__/bulkCreate.test.js b/routes/__tests__/bulkCreate.test.js index 7ce75173..917cc7e6 100644 --- a/routes/__tests__/bulkCreate.test.js +++ b/routes/__tests__/bulkCreate.test.js @@ -33,4 +33,4 @@ it("'/bulkCreate' route functions", async () => { expect(response.headers["date"]).toBeTruthy() expect(response.headers["etag"]).toBeTruthy() expect(response.headers["link"]).toBeTruthy() -}, 20000) +}) diff --git a/routes/__tests__/delete.test.js b/routes/__tests__/delete.test.js index d4d0e16d..ac012840 100644 --- a/routes/__tests__/delete.test.js +++ b/routes/__tests__/delete.test.js @@ -37,4 +37,4 @@ it("'/delete' route functions", async () => { .then(resp => resp) .catch(err => err) expect(response.statusCode).toBe(204) -}, 20000) +}) diff --git a/routes/__tests__/history.test.js b/routes/__tests__/history.test.js index 9a6c7957..c4c87b22 100644 --- a/routes/__tests__/history.test.js +++ b/routes/__tests__/history.test.js @@ -27,4 +27,4 @@ it("'/history/:id' route functions", async () => { expect(response.headers["allow"]).toBeTruthy() expect(response.headers["link"]).toBeTruthy() expect(Array.isArray(response.body)).toBe(true) -}, 20000) +}) diff --git a/routes/__tests__/patch.test.js b/routes/__tests__/patch.test.js index 1243d09a..a4d9ebc1 100644 --- a/routes/__tests__/patch.test.js +++ b/routes/__tests__/patch.test.js @@ -37,4 +37,4 @@ it("'/patch' route functions", async () => { expect(response.headers["allow"]).toBeTruthy() expect(response.headers["link"]).toBeTruthy() -}, 20000) +}) diff --git a/routes/__tests__/set.test.js b/routes/__tests__/set.test.js index e69dfb7e..1559356c 100644 --- a/routes/__tests__/set.test.js +++ b/routes/__tests__/set.test.js @@ -39,4 +39,4 @@ it("'/set' route functions", async () => { expect(response.headers["etag"]).toBeTruthy() expect(response.headers["allow"]).toBeTruthy() expect(response.headers["link"]).toBeTruthy() -}, 20000) +}) diff --git a/routes/__tests__/since.test.js b/routes/__tests__/since.test.js index 157a1872..13f9579f 100644 --- a/routes/__tests__/since.test.js +++ b/routes/__tests__/since.test.js @@ -26,4 +26,4 @@ it("'/since/:id' route functions", async () => { expect(response.headers["allow"]).toBeTruthy() expect(response.headers["link"]).toBeTruthy() expect(Array.isArray(response.body)).toBe(true) -}, 20000) \ No newline at end of file +}) \ No newline at end of file diff --git a/routes/__tests__/unset.test.js b/routes/__tests__/unset.test.js index ee3fc0d4..e3c8c97c 100644 --- a/routes/__tests__/unset.test.js +++ b/routes/__tests__/unset.test.js @@ -37,5 +37,5 @@ it("'/unset' route functions", async () => { expect(response.headers["etag"]).toBeTruthy() expect(response.headers["allow"]).toBeTruthy() expect(response.headers["link"]).toBeTruthy() -}, 20000) +}) diff --git a/routes/__tests__/update.test.js b/routes/__tests__/update.test.js index 593c9332..df5e21a3 100644 --- a/routes/__tests__/update.test.js +++ b/routes/__tests__/update.test.js @@ -40,4 +40,4 @@ it("'/update' route functions", async () => { expect(response.headers["allow"]).toBeTruthy() expect(response.headers["link"]).toBeTruthy() -}, 20000) +}) diff --git a/routes/api-routes.js b/routes/api-routes.js index a11db8c7..e5cdc743 100644 --- a/routes/api-routes.js +++ b/routes/api-routes.js @@ -46,9 +46,9 @@ import sinceRouter from './since.js'; import historyRouter from './history.js'; router.use(staticRouter) -router.use('/id',idRouter)//skip -router.use('/api', compatabilityRouter)//skip -router.use('/api/query', queryRouter)//skip +router.use('/id',idRouter) +router.use('/api', compatabilityRouter) +router.use('/api/query', queryRouter) router.use('/api/search', searchRouter) router.use('/api/create', createRouter) router.use('/api/bulkCreate', bulkCreateRouter) From 5dfaff32fe6692842910cf6c1937cf582caca50a Mon Sep 17 00:00:00 2001 From: Bryan Haberberger Date: Mon, 30 Mar 2026 14:10:16 -0500 Subject: [PATCH 5/5] We have to update this package for the code to work --- package-lock.json | 8 ++++---- package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index c5f495e3..d688c74a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14,7 +14,7 @@ "debug": "~4.4.3", "dotenv": "~17.2.3", "express": "^5.2.1", - "express-oauth2-jwt-bearer": "~1.7.1", + "express-oauth2-jwt-bearer": "^1.7.4", "express-urlrewrite": "~2.0.3", "mongodb": "^7.0.0", "morgan": "~1.10.1" @@ -2568,9 +2568,9 @@ } }, "node_modules/express-oauth2-jwt-bearer": { - "version": "1.7.1", - "resolved": "https://registry.npmjs.org/express-oauth2-jwt-bearer/-/express-oauth2-jwt-bearer-1.7.1.tgz", - "integrity": "sha512-IYwLHW9bysGnASwFfXqEZ2aJzY2g4B9P36sWgeIkSqWh1SjeIc8mfoeNsBpzil/lhXNWuttPH0rWQ6norZUBIg==", + "version": "1.7.4", + "resolved": "https://registry.npmjs.org/express-oauth2-jwt-bearer/-/express-oauth2-jwt-bearer-1.7.4.tgz", + "integrity": "sha512-teO/eyvU8OkJXiP4cRuoJMrp31nNvjnL47MIkso0D/21AqUGv1O+VEiLisrDA8xjkaCBTufYnV1zepCOCLK4vg==", "license": "MIT", "dependencies": { "jose": "^4.15.5" diff --git a/package.json b/package.json index 53088757..bd44127c 100644 --- a/package.json +++ b/package.json @@ -35,7 +35,7 @@ "debug": "~4.4.3", "dotenv": "~17.2.3", "express": "^5.2.1", - "express-oauth2-jwt-bearer": "~1.7.1", + "express-oauth2-jwt-bearer": "^1.7.4", "express-urlrewrite": "~2.0.3", "mongodb": "^7.0.0", "morgan": "~1.10.1"