Procházet zdrojové kódy

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

ErnestoOrtiz2 před 2 roky
rodič
revize
01a18e6952
2 změnil soubory, kde provedl 3 přidání a 1 odebrání
  1. 1
    1
      screens/auth/RegisterScreen.js
  2. 2
    0
      screens/main/Home_page.js

+ 1
- 1
screens/auth/RegisterScreen.js Zobrazit soubor

@@ -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 Zobrazit soubor

@@ -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