fix(client): sync Redux store and DB (#39034)

This commit is contained in:
Oliver Eyton-Williams
2020-06-10 08:54:19 +02:00
committed by GitHub
parent 0fd8b7a6db
commit 6b8c2e74b6
3 changed files with 16 additions and 9 deletions

View File

@@ -79,9 +79,14 @@ function* validateUsernameSaga({ payload }) {
function* verifyCertificationSaga({ payload }) {
try {
const {
data: { response, isCertMap }
data: { response, isCertMap, completedChallenges }
} = yield call(putVerifyCert, payload);
yield put(verifyCertComplete({ ...response, payload: isCertMap }));
yield put(
verifyCertComplete({
...response,
payload: { ...isCertMap, completedChallenges }
})
);
yield put(createFlashMessage(response));
} catch (e) {
yield put(verifyCertError(e));