Skip to content

Commit 3a29482

Browse files
committed
update README.md and add the offline mode
2 parents 4c902b2 + ef8ea17 commit 3a29482

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

lib/printUtil.js

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ const populateQueueValueHelp = async function (_, req) {
3737
req.results[index] = { ID: item.qname };
3838
});
3939
req.results.$count = resp.data.length;
40-
} else {
40+
} else { // Offline / Console Mode - Mocked printer queues
4141
const offlineQueues = [
4242
{ ID: 'DEFAULT_PRINTER' },
4343
{ ID: 'HP_LASERJET_PRO' },
@@ -133,12 +133,11 @@ const print = async function (_, req) {
133133
logger.info(`Document sent to print queue ${qname}`);
134134
return req.info(200, `Document sent to print queue ${qname} \n
135135
No. of copies requested: ${numberOfCopies}`);
136-
} else {
137-
// Offline / Console Mode
138-
docsToPrint.forEach((doc) => {
139-
logger.info(`Document ${doc.fileName} with object key ${doc.objectKey} and content length ${doc.content.length} has been sent to print queue ${qname}`);
140-
});
141-
}
136+
} else { // Offline / Console Mode
137+
docsToPrint.forEach((doc) => {
138+
logger.info(`Document ${doc.fileName} with object key ${doc.objectKey} and content length ${doc.content.length} has been sent to print queue ${qname}`);
139+
});
140+
}
142141
}
143142

144143
module.exports = { print, populateQueueValueHelp };

0 commit comments

Comments
 (0)