Send challenge files to the backend for persistence (#170)

This commit is contained in:
Stuart Taylor
2018-06-12 16:42:39 +01:00
committed by Mrugesh Mohapatra
parent 285fb0037b
commit c7e987111f

View File

@ -20,7 +20,8 @@ import {
types,
challengeMetaSelector,
challengeTestsSelector,
closeModal
closeModal,
challengeFilesSelector
} from './';
import {
userSelector,
@ -60,13 +61,15 @@ function submitModern(type, state) {
if (type === types.submitChallenge) {
const { id } = challengeMetaSelector(state);
const files = challengeFilesSelector(state);
const { username } = userSelector(state);
return postChallenge(
'/external/modern-challenge-completed',
username,
csrfToken,
{
id
id,
files
}
);
}