Skip to content

Commit

Permalink
standard --fix
Browse files Browse the repository at this point in the history
  • Loading branch information
jorgtho committed Sep 27, 2022
1 parent a819aef commit 0b6f0cc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lib/archive.js
Original file line number Diff line number Diff line change
Expand Up @@ -337,4 +337,4 @@ module.exports.signOffResponseLetter = async (blobContent) => {
}

return blobContent
}
}
6 changes: 3 additions & 3 deletions lib/run-flow.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ module.exports = async (blobContent, flowDef) => {
// create and archive response letter
if (flowDef.archiveResponseLetter) {
if (flowDef.signOff) throw new Error('You cannot both have regular signoff and reponse-letter activated. You need to activate signoffResponseLetter instead')

if (!blobContent.flow.archiveResponseLetter || blobContent.flow.archiveResponseLetter.status !== 'finished') {
blobContent = await archiveResponseLetter(blobContent)
}
Expand All @@ -105,7 +105,7 @@ module.exports = async (blobContent, flowDef) => {
// send response letter
if (flowDef.sendResponseLetter) {
if (!flowDef.archiveResponseLetter) throw new Error('You cannot use sendResponseLetter without using archiveResponseLetter')

if (!blobContent.flow.sendResponseLetter || blobContent.flow.sendResponseLetter.status !== 'finished') {
blobContent = await sendResponseLetter(blobContent)
}
Expand All @@ -121,7 +121,7 @@ module.exports = async (blobContent, flowDef) => {
// sign off with the original document with response letters DocumentNumber
if (flowDef.signOffResponseLetter) {
if (!flowDef.sendResponseLetter) throw new Error('You cannot use signOffResponseLetter without using sendResponseLetter')

if (!blobContent.flow.signOffResponseLetter || blobContent.flow.signOffResponseLetter.status !== 'finished') {
blobContent = await signOffResponseLetter(blobContent)
}
Expand Down

0 comments on commit 0b6f0cc

Please sign in to comment.