Browse Source

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

ErnestoOrtiz2 2 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,7 +13,7 @@ export default class RegisterScreen extends Component {
13 13
             username: '',
14 14
             email: '',
15 15
             password: '',
16
-            interpreter: false,
16
+            interpreter: '',
17 17
         };
18 18
         this.onRegister = this.onRegister.bind(this)
19 19
     };

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

@@ -245,7 +245,9 @@ async function registerForPushNotificationsAsync() {
245 245
     });
246 246
   }
247 247
 
248
+  firebase.firestore().collection('Interprete').doc(firebase.auth().currentUser.uid).update({'push_token': token})
248 249
   firebase.firestore().collection('Users').doc(firebase.auth().currentUser.uid).update({'push_token': token})
250
+
249 251
   return token;
250 252
 }
251 253