ソースを参照

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

ErnestoOrtiz2 2 年 前
コミット
01a18e6952
共有2 個のファイルを変更した3 個の追加1 個の削除を含む
  1. 1
    1
      screens/auth/RegisterScreen.js
  2. 2
    0
      screens/main/Home_page.js

+ 1
- 1
screens/auth/RegisterScreen.js ファイルの表示

@@ -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 ファイルの表示

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