Skip to content

Commit

Permalink
Remove logging for buffer length in createDocumentBuffer functions
Browse files Browse the repository at this point in the history
  • Loading branch information
HlexNC authored Mar 29, 2024
1 parent a4961a6 commit 32c6408
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 3 deletions.
1 change: 0 additions & 1 deletion officegen-api/src/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ app.post('/api/create-document', async (req, res) => {
app.post('/api/create-document/buffer', async (req, res) => {
try {
const buffer = await documentLibrary.createDocumentBuffer(req.body.elements, req.body.styles);
console.log(buffer.length + ' bytes written to buffer.');
res.setHeader('Content-Disposition', 'attachment; filename=document.docx');
res.setHeader('Content-Type', 'application/vnd.openxmlformats-officedocument.wordprocessingml.document');
res.send(buffer);
Expand Down
1 change: 0 additions & 1 deletion officegen-api/src/documentLibrary.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ exports.createDocumentWithStructure = async (elements, styles) => {
exports.createDocumentBuffer = async (elements, styles) => {
try {
const buffer = await officegenHelper.createDocxBuffer(elements, styles);
console.log(buffer.length + ' bytes written to buffer.');
return buffer;
} catch (error) {
throw error;
Expand Down
1 change: 0 additions & 1 deletion officegen-api/src/utils/officegenHelper.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,6 @@ exports.createDocxBuffer = async (elements, styles) => {

bufferStream.on('finish', () => {
const buffer = bufferStream.getContents();
console.log(buffer.length + ' bytes written to buffer.');
resolve(buffer);
});

Expand Down

0 comments on commit 32c6408

Please sign in to comment.