Skip to content

Commit

Permalink
Merge pull request #3 from parsebio/fix-submit-work-hook
Browse files Browse the repository at this point in the history
Fix submit work hook
  • Loading branch information
cosa65 authored Jan 11, 2024
2 parents 9f7f8eb + 8119936 commit 7915e87
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 16 deletions.
7 changes: 7 additions & 0 deletions src/api.v2/helpers/worker/workSubmit/submitWorkForHook.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,15 @@ const generateETag = require('../generateEtag');


const submitWorkForHook = async (experimentId, authJWT, body) => {
const requestProps = {
broadcast: false,
cacheUniquenessKey: null,
};

const data = {
experimentId,
body,
requestProps,
};

const ETag = await generateETag(data);
Expand All @@ -19,6 +25,7 @@ const submitWorkForHook = async (experimentId, authJWT, body) => {
authJWT,
timeout: timeoutDate.toISOString(),
body,
requestProps,
};

await validateAndSubmitWork(request);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

exports[`submitWorkEmbedding submits the work and the ETag / params are correct 1`] = `Array []`;

exports[`submitWorkEmbedding submits the work and the ETag / params are correct 2`] = `"c23f6aafc294df519ff5b3d8f09523c6"`;
exports[`submitWorkEmbedding submits the work and the ETag / params are correct 2`] = `"4f9c58d4db390500745d62b5f7ee181c"`;
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

exports[`submitWorkEmbedding submits the work and the ETag / params are correct 1`] = `Array []`;

exports[`submitWorkEmbedding submits the work and the ETag / params are correct 2`] = `"0203f436e60cf81f3c559a33fac0a301"`;
exports[`submitWorkEmbedding submits the work and the ETag / params are correct 2`] = `"df50998806a38da5544061096143add9"`;
16 changes: 2 additions & 14 deletions tests/config/__snapshots__/getDomainSpecificContent.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
exports[`getDomainSpecificContent tests check content for BIOMAGE: getDomainSpecificContent for BIOMAGE 1`] = `
Object {
"adminEmail": "[email protected]",
"githubOrganisationName": "biomage-org",
"githubOrganisationName": "parsebio",
"middlewareChecks": [Function],
"moreEmailInfo": "More information about Cellenics can be found at <a href=\\"https://biomage.net\\">biomage.net</a>.<br/><br/>
If you need help or have any questions, please contact us at hello@biomage.net. <br/><br/>",
Expand All @@ -13,22 +13,10 @@ Object {
}
`;

exports[`getDomainSpecificContent tests check content for HMS: getDomainSpecificContent for HMS 1`] = `
Object {
"adminEmail": "[email protected]",
"githubOrganisationName": "hms-dbmi-cellenics",
"middlewareChecks": [Function],
"moreEmailInfo": "",
"notificationEmail": "[email protected]",
"podCPUs": 8,
"podMemory": 57344,
}
`;

exports[`getDomainSpecificContent tests check content for the biomage account: getDomainSpecificContent for biomage private account 1`] = `
Object {
"adminEmail": "[email protected]",
"githubOrganisationName": "biomage-org",
"githubOrganisationName": "parsebio",
"middlewareChecks": [Function],
"moreEmailInfo": "More information about Cellenics can be found at <a href=\\"https://biomage.net\\">biomage.net</a>.<br/><br/>
If you need help or have any questions, please contact us at hello@biomage.net. <br/><br/>",
Expand Down

0 comments on commit 7915e87

Please sign in to comment.