Skip to content

Commit

Permalink
emergency fix for v2 test id
Browse files Browse the repository at this point in the history
  • Loading branch information
gnarf committed Apr 25, 2024
1 parent 1c2f3e8 commit 0df012b
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/host/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ export async function hostMain({
};
const perTestUrl = callbackUrl.replace(
':testRowNumber',
body.testCsvRow ?? body.presentationNumber
body.presentationNumber ?? body.testCsvRow
);
lastCallbackRequest = lastCallbackRequest.then(() =>
fetch(perTestUrl, {
Expand All @@ -100,10 +100,9 @@ export async function hostMain({
const file = plan.files.find(({ name }) => name === test.filepath);
const testSource = JSON.parse(textDecoder.decode(file.bufferData));

const callbackBody = {
testCsvRow: testSource.info.testId,
presentationNumber: testSource.info.presentationNumber,
};
const { presentationNumber, testId: testCsvRow } = testSource.info;

const callbackBody = presentationNumber ? { presentationNumber } : { testCsvRow };

try {
postCallbackWhenEnabled({ ...callbackBody, status: 'RUNNING' });
Expand Down

0 comments on commit 0df012b

Please sign in to comment.