@@ -52,8 +52,8 @@ async function isTasksBundleDownloaded(competition: Competition) {
5252 }
5353}
5454
55- async function getReadmeContent ( competition : Competition ) {
56- const readmeFile = `${ getCompetitionWorkspace ( competition ) } /README.md ` ;
55+ async function getReadmeContent ( competition : Competition , fileName : string ) {
56+ const readmeFile = `${ getCompetitionWorkspace ( competition ) } /${ fileName } ` ;
5757 // check if file exists
5858 if (
5959 await fsPromises
@@ -102,7 +102,8 @@ export async function getCompetitionStatus(
102102 states : await getStates ( competition ) ,
103103 workspace : getCompetitionWorkspace ( competition ) ,
104104 relativeWorkspace : getRelativeCompetitionWorkspace ( competition ) ,
105- readmeContent : await getReadmeContent ( competition ) ,
105+ readmeContent : await getReadmeContent ( competition , 'README.md' ) ,
106+ setupReadmeContent : await getReadmeContent ( competition , 'README.setup.md' ) ,
106107 competitorId : await getRegisteredCompetitorId ( competition ) ,
107108 } ;
108109 }
@@ -179,6 +180,7 @@ export async function submitWork(competition: Competition) {
179180
180181export async function createCompetitorJson ( competitionId : string , data : Record < string , string > ) {
181182 try {
183+ await fsPromises . mkdir ( `${ getCompetitionWorkspace ( competitionId ) } /work` , { recursive : true } ) ;
182184 await fsPromises . writeFile (
183185 `${ getCompetitionWorkspace ( competitionId ) } /work/competitor.json` ,
184186 JSON . stringify ( data ) ,
0 commit comments