Skip to content

Commit

Permalink
Replace С Cyrillic letter "Es" with C
Browse files Browse the repository at this point in the history
  • Loading branch information
ezewer committed Mar 6, 2024
1 parent 35a3e39 commit 83506bb
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion config/service.report.json.example
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@
},
"isSpamRestrictionMode": true,
"isAddedUniqueEndingToReportFileName": false,
"isСompress": true,
"isCompress": true,
"isLoggerDisabled": false
}
4 changes: 2 additions & 2 deletions workers/loc.api/queue/helpers/get-report-content-type.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

module.exports = (params) => {
const {
isСompress,
isCompress,
isPDFRequired
} = params ?? {}

if (isСompress) {
if (isCompress) {
return 'application/zip'
}
if (isPDFRequired) {
Expand Down
22 changes: 11 additions & 11 deletions workers/loc.api/queue/upload-to-s3/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@ const {
} = require('../helpers')

const _uploadSignToS3 = async (
isСompress,
isCompress,
deflateFac,
grcBfxReq,
configs,
signature,
fileNameWithoutExt
) => {
const fileName = `SIGNATURE_${fileNameWithoutExt}.sig`
const signFileName = isСompress
const signFileName = isCompress
? `SIGNATURE_${fileNameWithoutExt}.zip`
: fileName

Expand All @@ -32,7 +32,7 @@ const _uploadSignToS3 = async (

const signBuffers = await Promise.all(deflateFac.createBuffZip(
[signStream],
isСompress,
isCompress,
{
comment: `SIGNATURE_${fileNameWithoutExt.replace(/_/g, ' ')}`
}
Expand All @@ -42,7 +42,7 @@ const _uploadSignToS3 = async (
const signOpts = {
...configs,
contentDisposition: `attachment; filename="${signFileName}"`,
contentType: isСompress
contentType: isCompress
? 'application/zip'
: 'application/pgp-signature'
}
Expand All @@ -56,7 +56,7 @@ const _uploadSignToS3 = async (

module.exports = (
{
isСompress,
isCompress,
isAddedUniqueEndingToReportFileName
},
deflateFac,
Expand Down Expand Up @@ -108,25 +108,25 @@ module.exports = (
})
const buffers = await Promise.all(deflateFac.createBuffZip(
streams,
isСompress,
isCompress,
{
comment: fileNameWithoutExt.replace(/_/g, ' ')
}
))

const promises = buffers.map(async (buffer, i) => {
const ext = isСompress ? 'zip' : ''
const singleFileName = isСompress
const ext = isCompress ? 'zip' : ''
const singleFileName = isCompress
? streams[i].data.name.slice(0, -3)
: streams[i].data.name
const fileName = isСompress && isMultiExport
const fileName = isCompress && isMultiExport
? `${fileNameWithoutExt}.zip`
: `${singleFileName}${ext}`
const opts = {
...configs,
contentDisposition: `attachment; filename="${fileName}"`,
contentType: getReportContentType({
isСompress,
isCompress,
isPDFRequired: subParamsArr[i].isPDFRequired
})
}
Expand All @@ -147,7 +147,7 @@ module.exports = (

if (isSignReq) {
const signatureS3 = await _uploadSignToS3(
isСompress,
isCompress,
deflateFac,
grcBfxReq,
configs,
Expand Down

0 comments on commit 83506bb

Please sign in to comment.