This commit is contained in:
Rick Reilly
2020-02-13 15:17:43 -05:00
parent 01f17bccf7
commit 0c0b14cdfe
2 changed files with 5 additions and 4 deletions

View File

@@ -31,17 +31,18 @@ export function* handleNewUserRegistration(action) {
export function* handleLoginRequest(action) {
try {
yield put(registerNewUserBegin());
yield put(loginRequestBegin());
yield call(postNewUser, action.payload.registrationInfo);
yield put(registerNewUserSuccess());
yield put(loginRequestSuccess());
} catch (e) {
yield put(registerNewUserFailure());
yield put(loginRequestFailure());
throw e;
}
}
export default function* saga() {
yield takeEvery(REGISTER_NEW_USER.BASE, handleNewUserRegistration);
yield takeEvery(LOGIN_REQUEST.BASE, handleLoginRequest);
}

View File

@@ -1,6 +1,6 @@
import { getConfig } from '@edx/frontend-platform';
import { getHttpClient } from '@edx/frontend-platform/auth';
import querystring from "querystring";
import querystring from 'querystring';
export async function postNewUser(registrationInformation) {
const requestConfig = {