Browse Source

Corregi un bug para registrar los push notification tokens de los interpretes

ErnestoOrtiz2 3 years ago
parent
commit
01a18e6952
2 changed files with 3 additions and 1 deletions
  1. 1
    1
      screens/auth/RegisterScreen.js
  2. 2
    0
      screens/main/Home_page.js

+ 1
- 1
screens/auth/RegisterScreen.js View File

13
             username: '',
13
             username: '',
14
             email: '',
14
             email: '',
15
             password: '',
15
             password: '',
16
-            interpreter: false,
16
+            interpreter: '',
17
         };
17
         };
18
         this.onRegister = this.onRegister.bind(this)
18
         this.onRegister = this.onRegister.bind(this)
19
     };
19
     };

+ 2
- 0
screens/main/Home_page.js View File

245
     });
245
     });
246
   }
246
   }
247
 
247
 
248
+  firebase.firestore().collection('Interprete').doc(firebase.auth().currentUser.uid).update({'push_token': token})
248
   firebase.firestore().collection('Users').doc(firebase.auth().currentUser.uid).update({'push_token': token})
249
   firebase.firestore().collection('Users').doc(firebase.auth().currentUser.uid).update({'push_token': token})
250
+
249
   return token;
251
   return token;
250
 }
252
 }
251
 
253