@friggframework/core 2.0.0--canary.490.883b991.0 → 2.0.0--canary.490.fd1ef7f.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -2,6 +2,7 @@ const { prisma } = require('../../database/prisma');
|
|
|
2
2
|
const {
|
|
3
3
|
CredentialRepositoryInterface,
|
|
4
4
|
} = require('./credential-repository-interface');
|
|
5
|
+
const { removeUndefinedValues } = require('../../database/utils/documentdb-compatibility');
|
|
5
6
|
|
|
6
7
|
/**
|
|
7
8
|
* MongoDB Credential Repository Adapter
|
|
@@ -156,14 +157,16 @@ class CredentialRepositoryMongo extends CredentialRepositoryInterface {
|
|
|
156
157
|
}
|
|
157
158
|
|
|
158
159
|
// Create new credential
|
|
160
|
+
// Remove undefined values to prevent Prisma from using $$REMOVE (DocumentDB unsupported)
|
|
161
|
+
const credentialData = removeUndefinedValues({
|
|
162
|
+
userId: userId || user,
|
|
163
|
+
externalId,
|
|
164
|
+
authIsValid: authIsValid,
|
|
165
|
+
data: oauthData,
|
|
166
|
+
});
|
|
167
|
+
|
|
159
168
|
const created = await this.prisma.credential.create({
|
|
160
|
-
data:
|
|
161
|
-
userId: userId || user,
|
|
162
|
-
externalId,
|
|
163
|
-
authIsValid: authIsValid,
|
|
164
|
-
|
|
165
|
-
data: oauthData,
|
|
166
|
-
},
|
|
169
|
+
data: credentialData,
|
|
167
170
|
});
|
|
168
171
|
|
|
169
172
|
return {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@friggframework/core",
|
|
3
3
|
"prettier": "@friggframework/prettier-config",
|
|
4
|
-
"version": "2.0.0--canary.490.
|
|
4
|
+
"version": "2.0.0--canary.490.fd1ef7f.0",
|
|
5
5
|
"dependencies": {
|
|
6
6
|
"@aws-sdk/client-apigatewaymanagementapi": "^3.588.0",
|
|
7
7
|
"@aws-sdk/client-kms": "^3.588.0",
|
|
@@ -38,9 +38,9 @@
|
|
|
38
38
|
}
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
|
-
"@friggframework/eslint-config": "2.0.0--canary.490.
|
|
42
|
-
"@friggframework/prettier-config": "2.0.0--canary.490.
|
|
43
|
-
"@friggframework/test": "2.0.0--canary.490.
|
|
41
|
+
"@friggframework/eslint-config": "2.0.0--canary.490.fd1ef7f.0",
|
|
42
|
+
"@friggframework/prettier-config": "2.0.0--canary.490.fd1ef7f.0",
|
|
43
|
+
"@friggframework/test": "2.0.0--canary.490.fd1ef7f.0",
|
|
44
44
|
"@prisma/client": "^6.17.0",
|
|
45
45
|
"@types/lodash": "4.17.15",
|
|
46
46
|
"@typescript-eslint/eslint-plugin": "^8.0.0",
|
|
@@ -80,5 +80,5 @@
|
|
|
80
80
|
"publishConfig": {
|
|
81
81
|
"access": "public"
|
|
82
82
|
},
|
|
83
|
-
"gitHead": "
|
|
83
|
+
"gitHead": "fd1ef7faa5d1584934b3c2e15d1e0aa4d068fa38"
|
|
84
84
|
}
|