Skip to content

Commit

Permalink
refactor: rename document.name to document.name_out
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel-jones-dev committed Dec 11, 2023
1 parent 0e22f72 commit 032d15d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion documents.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ async function createDocument(file, authKey, targetLang, sourceLang, glossary) {
key: documentKey,
pathIn,
path_out: undefined,
name: file.name,
name_out: file.name,
mimetype: file.mimetype,
created: new Date(),
used: new Date(),
Expand Down
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ async function handleDocumentDownload(req, res) {
res.status(503).send({ message: 'Document translation is not done' });
} else {
res.status(200);
res.download(document.path_out, document.name, (err) => {
res.download(document.path_out, document.name_out, (err) => {
if (err) {
console.log(`Error occurred during file download: ${err}`);
} else {
Expand Down

0 comments on commit 032d15d

Please sign in to comment.