diff --git a/package-lock.json b/package-lock.json index 8b5dbf36b..22605c63f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2016,13 +2016,12 @@ } }, "@types/mongodb": { - "version": "3.1.8", - "resolved": "https://registry.npmjs.org/@types/mongodb/-/mongodb-3.1.8.tgz", - "integrity": "sha512-5higsHdPx63XKIh5hjr5GGrCCErBqEbpZZiNsUcqk97mMDpCBH9R4dRi/T8bcMrQItCdL+wecagdAj3JPKkuVg==", + "version": "3.1.14", + "resolved": "https://registry.npmjs.org/@types/mongodb/-/mongodb-3.1.14.tgz", + "integrity": "sha512-Hc9nhu9Z33Gq8SP2CZluNlhwbXBCEGAzLMQPEceZG0wUt/ZTzIGaeo8RXu7FWNXfUd6JHh6KHl0YjQlu6TgncQ==", "dev": true, "requires": { "@types/bson": "*", - "@types/events": "*", "@types/node": "*" } }, diff --git a/package.json b/package.json index 127a62e0d..4a4f4d4c0 100644 --- a/package.json +++ b/package.json @@ -144,7 +144,7 @@ "@types/lodash": "^4.14.111", "@types/luxon": "^0.5.3", "@types/mini-css-extract-plugin": "^0.2.0", - "@types/mongodb": "^3.1.8", + "@types/mongodb": "^3.1.14", "@types/ms": "^0.7.30", "@types/node": "^10.5.2", "@types/node-fetch": "^2.1.2", diff --git a/src/core/server/models/tenant.ts b/src/core/server/models/tenant.ts index 5e7a07061..56a425f04 100644 --- a/src/core/server/models/tenant.ts +++ b/src/core/server/models/tenant.ts @@ -320,18 +320,14 @@ export async function updateTenantOIDCAuthIntegration( const result = await collection(mongo).findOneAndUpdate( { id }, { - // $set: dotize({ - // "auth.integrations.oidc.$[oidc]": input, - // }), - // FIXME: uncomment when https://github.com/DefinitelyTyped/DefinitelyTyped/pull/29986 gets merged $set: dotize({ - "auth.integrations.oidc.$[]": input, + "auth.integrations.oidc.$[oidc]": input, }), }, { // Add an ArrayFilter to only update one of the OpenID Connect // integrations. - // arrayFilters: [{ "oidc.id": oidcID }], // FIXME: uncomment when https://github.com/DefinitelyTyped/DefinitelyTyped/pull/29986 gets merged + arrayFilters: [{ "oidc.id": oidcID }], // False to return the updated document instead of the original // document. returnOriginal: false,