trc-client-core
Version:
The core of the TRC Client
18 lines (15 loc) • 815 B
JavaScript
import xhr from 'trc-client-core/src/utils/xhr';
import {createAction} from 'redux-actions'
import {ENDPOINT_LEARNING_EVENT_CERTIFICATION} from 'trc-client-core/src/constants/Endpoints';
import {
LEARNING_EVENT_REQUEST_CERTIFICATION,
LEARNING_EVENT_REQUEST_COMPLETION
} from 'trc-client-core/src/constants/ActionTypes';
export const requestLearningEventCertification = createAction(
LEARNING_EVENT_REQUEST_CERTIFICATION,
(certificationType, query) => xhr.get(`${ENDPOINT_LEARNING_EVENT_CERTIFICATION}/${certificationType}`, query)
);
export const requestLearningEventCompletion = createAction(
LEARNING_EVENT_REQUEST_COMPLETION,
query => xhr.get(`/learning/participant/${query.participantId}/course/${query.courseCode}/start_then_complete?participantId=${query.participantId}`, query)
);