feat(api): modern challenge submission endpoint (#50998)

Co-authored-by: Naomi Carrigan <nhcarrigan@gmail.com>
Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>
Co-authored-by: Muhammed Mustafa <muhammed@freecodecamp.org>
This commit is contained in:
Niraj Nandish
2023-08-31 16:58:58 +04:00
committed by GitHub
parent f6b970fbee
commit b0022fc45f
4 changed files with 456 additions and 11 deletions

View File

@@ -4,7 +4,7 @@ import { omit, pick } from 'lodash';
import { challengeTypes } from '../../../config/challenge-types';
import { getChallenges } from './get-challenges';
const jsCertProjectIds = [
export const jsCertProjectIds = [
'aaa48de84e1ecc7c742e1124',
'a7f4d8f2483413a6ce226cac',
'56533eb9ac21ba0edf2244e2',
@@ -12,7 +12,7 @@ const jsCertProjectIds = [
'aa2e6f85cab2ab736c9a9b24'
];
const multifileCertProjectIds = getChallenges()
export const multifileCertProjectIds = getChallenges()
.filter(c => c.challengeType === challengeTypes.multifileCertProject)
.map(c => c.id);
@@ -24,14 +24,14 @@ type SavedChallengeFile = {
key: string;
ext: string; // NOTE: This is Ext type in client
name: string;
history?: string[];
history: string[];
contents: string;
};
type SavedChallenge = {
id: string;
lastSavedDate: number;
files?: SavedChallengeFile[];
files: SavedChallengeFile[];
};
// TODO: Confirm this type - read comments below
@@ -55,7 +55,7 @@ type CompletedChallengeFile = {
path?: string | null;
};
type CompletedChallenge = {
export type CompletedChallenge = {
id: string;
solution?: string | null;
githubLink?: string | null;