Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #972 Add country flags at username - Fix deployment #1041

Merged
merged 3 commits into from
Sep 20, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions functions/src/Integrations/user-triggers.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as functions from 'firebase-functions'
import { db } from '../Firebase/firestoreDB'

export handleUserChanges = functions.firestore
export const handleUserChanges = functions.firestore
.document('v3_users/{id}')
.onWrite(async (change, context) => {

Expand Down Expand Up @@ -31,7 +31,7 @@ async function updateHowTosCountry(userId, country){
if(querySnapshot){
querySnapshot.forEach(doc => {
console.log('Updating howTo ', doc.data()._id, 'to', country);
doc.ref.update({'_creatorCountry': country}).then( () => {
doc.ref.update({'creatorCountry': country}).then( () => {
console.log("Document successfully updated!");
return true
}).catch( error => {
Expand Down