-
-
Save lobot/f8b5eb6d1f470eaa5571150e541ddfcf to your computer and use it in GitHub Desktop.
rich_new_code
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Returns the expected file locations for each of the raws and proofs before and after preflighting. | |
*/ | |
function getPathsAndInstructions(msg) { | |
const id = msg.resource.id; | |
const orderIdWithoutPrefix = id.substring(id.indexOf('_') + 1); | |
const baseURL = '/' + orderIdWithoutPrefix + '/' + id; | |
return { | |
id, | |
resource_type: msg.resource_type, | |
receiptHandle: msg.receiptHandle, | |
rawUri: baseURL + '_raw.pdf', | |
rawX1a: baseURL + '_raw.pdfx', | |
rawNonX1a: baseURL + '_raw_non_x1a.pdf', | |
proofUri: baseURL + '.pdf', | |
proofX1a: baseURL + '.pdfx', | |
proofNonX1a: baseURL + '_non_x1a.pdf', | |
usePreflight: msg.launch_darkly_flags['picasso.use_preflight'] === '1', | |
strictPreflight: msg.launch_darkly_flags['picasso.strict_preflight'] === '1' | |
}; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment