fix: comments out update-my-current-challenge call (#46028)
parent
9acd8798fd
commit
301c2a598a
|
@ -1,36 +1,30 @@
|
|||
import { put, select, takeEvery } from 'redux-saga/effects';
|
||||
import { put, takeEvery } from 'redux-saga/effects';
|
||||
import store from 'store';
|
||||
|
||||
import {
|
||||
isSignedInSelector,
|
||||
updateComplete,
|
||||
updateFailed
|
||||
} from '../../../redux';
|
||||
|
||||
import { randomCompliment } from '../../../utils/get-words';
|
||||
import { updateSuccessMessage } from './';
|
||||
|
||||
export const CURRENT_CHALLENGE_KEY = 'currentChallengeId';
|
||||
|
||||
export function* currentChallengeSaga({ payload: id }) {
|
||||
store.set(CURRENT_CHALLENGE_KEY, id);
|
||||
const isSignedIn = yield select(isSignedInSelector);
|
||||
if (isSignedIn) {
|
||||
const update = {
|
||||
endpoint: '/update-my-current-challenge',
|
||||
payload: {
|
||||
currentChallengeId: id
|
||||
}
|
||||
};
|
||||
try {
|
||||
// Temporarily removed to reduce calls to database
|
||||
// will need to re-import things at the top
|
||||
// yield call(post, update.endpoint, update.payload);
|
||||
yield put(updateComplete());
|
||||
} catch {
|
||||
yield put(updateFailed(update));
|
||||
}
|
||||
}
|
||||
yield store.set(CURRENT_CHALLENGE_KEY, id);
|
||||
// // Temporarily removed to reduce calls to database
|
||||
// // will need to re-import things at the top
|
||||
// // yield call(post, update.endpoint, update.payload);
|
||||
// const isSignedIn = yield select(isSignedInSelector);
|
||||
// if (isSignedIn) {
|
||||
// const update = {
|
||||
// endpoint: '/update-my-current-challenge',
|
||||
// payload: {
|
||||
// currentChallengeId: id
|
||||
// }
|
||||
// };
|
||||
// try {
|
||||
// yield put(updateComplete());
|
||||
// } catch {
|
||||
// yield put(updateFailed(update));
|
||||
// }
|
||||
// }
|
||||
}
|
||||
|
||||
export function* updateSuccessMessageSaga() {
|
||||
|
|
Loading…
Reference in New Issue