My groupId
argument is not recognized on updateDoc
function while other parameters are recognized. groupId
is only recognized on updateUserGroups
level.
async function updateUserGroups(userId, groupId, groupData) {
const userDoc = await getDocById('users', userId)
if (userDoc.data()['user_groups'] === undefined) {
updateDoc('users', userId, {
'user_groups': { groupId: groupData['creation_time'] }
})
}
}
Why is that?