fixing updating of status so that we get it done on unload

This commit is contained in:
Arjun Patel
2022-01-16 00:44:48 -08:00
parent a87b1742d5
commit 9b5af00466
3 changed files with 6 additions and 4 deletions
+2 -2
View File
@@ -66,9 +66,9 @@ export default class UserService {
);
}
async updateUserStatus(userId: string, newStatus: UserStatus) {
updateUserStatus(userId: string, newStatus: UserStatus) {
const docRef = doc(this.db, Collections.users, userId);
await setDoc(
setDoc(
docRef,
{ userStatus: newStatus, lastUpdatedDate: serverTimestamp() },
{ merge: true }