@edgedev/firebase 1.7.2 → 1.7.3
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.
- package/README.md +0 -4
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -125,7 +125,6 @@ exports.updateUser = functions.firestore.document('staged-users/{docId}').onUpda
|
|
|
125
125
|
return shouldProcess(eventRef).then((process) => {
|
|
126
126
|
if (process) {
|
|
127
127
|
// Note: we can trust on newData.uid because we are checking in rules that it matches the auth.uid
|
|
128
|
-
// TODO: user might be invited to join another org with reg code.. if used when logged will combine new staged-user doc into first stage-user doc and sync to users.
|
|
129
128
|
if (newData.userId) {
|
|
130
129
|
const userRef = db.collection('users').doc(newData.userId)
|
|
131
130
|
setUser(userRef, newData, oldData, stagedDocId).then(() => {
|
|
@@ -181,9 +180,6 @@ exports.updateUser = functions.firestore.document('staged-users/{docId}').onUpda
|
|
|
181
180
|
})
|
|
182
181
|
|
|
183
182
|
function setUser(userRef, newData, oldData, stagedDocId) {
|
|
184
|
-
// IT's OK If "users" doesn't match exactly matched "staged-users" because this is only preventing
|
|
185
|
-
// writing from outside the @edgdev/firebase functions, so discrepancies will be rare since
|
|
186
|
-
// the package will prevent before it gets this far.
|
|
187
183
|
return userRef.get().then((user) => {
|
|
188
184
|
let userUpdate = { meta: newData.meta, stagedDocId }
|
|
189
185
|
|