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