wip
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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 = {
|
||||
|
||||
Reference in New Issue
Block a user