UNPKG

trc-client-core

Version:
18 lines (15 loc) 815 B
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) );