瀏覽代碼

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

ErnestoOrtiz2 3 年之前
父節點
當前提交
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
             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 查看文件

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