mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-01-06 06:01:31 -05:00
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user