IO-244 Resolve IOU
This commit is contained in:
@@ -38,7 +38,9 @@ import {
|
||||
validatePasswordResetSuccess,
|
||||
} from "./user.actions";
|
||||
import UserActionTypes from "./user.types";
|
||||
|
||||
import axios from "axios";
|
||||
import { messaging } from "../../firebase/firebase.utils";
|
||||
import { getToken } from "firebase/messaging";
|
||||
export function* onEmailSignInStart() {
|
||||
yield takeLatest(UserActionTypes.EMAIL_SIGN_IN_START, signInWithEmail);
|
||||
}
|
||||
@@ -98,6 +100,15 @@ export function* signOutStart() {
|
||||
try {
|
||||
logImEXEvent("redux_sign_out");
|
||||
|
||||
const state = yield select();
|
||||
console.log(yield getToken(messaging));
|
||||
//unsub from topic.
|
||||
yield call(axios.post, "/notifications/unsubscribe", {
|
||||
fcm_tokens: yield getToken(messaging),
|
||||
imexshopid: state.user.bodyshop.imexshopid,
|
||||
type: "messaging",
|
||||
});
|
||||
|
||||
yield signOut(auth);
|
||||
yield put(signOutSuccess());
|
||||
localStorage.removeItem("token");
|
||||
|
||||
Reference in New Issue
Block a user