Skip to content

Commit 0cff788

Browse files
authored
formatting code (#206)
Co-authored-by: Wayne <5291640+ringoinca@users.noreply.github.com>
1 parent ddb4d56 commit 0cff788

4 files changed

Lines changed: 11 additions & 7 deletions

File tree

packages/backend/src/services/IndexingService.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,9 @@ export class IndexingService {
9595
const batchDocuments = await Promise.allSettled(
9696
batch.map(async (pendingEmail) => {
9797
try {
98-
const document = await this.indexEmailById(pendingEmail.archivedEmailId);
98+
const document = await this.indexEmailById(
99+
pendingEmail.archivedEmailId
100+
);
99101
if (document) {
100102
return document;
101103
}
@@ -119,7 +121,10 @@ export class IndexingService {
119121
} else if (result.status === 'rejected') {
120122
logger.error({ error: result.reason }, 'Failed to process email in batch');
121123
} else {
122-
logger.error({ result: result }, 'Failed to process email in batch, reason unknown.');
124+
logger.error(
125+
{ result: result },
126+
'Failed to process email in batch, reason unknown.'
127+
);
123128
}
124129
}
125130
}

packages/backend/src/services/IngestionService.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ export class IngestionService {
186186
(key) =>
187187
key !== 'providerConfig' &&
188188
originalSource[key as keyof IngestionSource] !==
189-
decryptedSource[key as keyof IngestionSource]
189+
decryptedSource[key as keyof IngestionSource]
190190
);
191191
if (changedFields.length > 0) {
192192
await this.auditService.createAuditLog({

packages/backend/src/services/StorageService.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ export class StorageService implements IStorageProvider {
117117
if (!prefix.equals(ENCRYPTION_PREFIX)) {
118118
// File is not encrypted, return a new stream containing the buffered prefix and the rest of the original stream
119119
const combinedStream = new Readable({
120-
read() { },
120+
read() {},
121121
});
122122
combinedStream.push(prefixAndIvBuffer);
123123
stream.on('data', (chunk) => {

packages/backend/src/services/ingestion-connectors/PSTConnector.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,6 @@ export class PSTConnector implements IEmailConnector {
139139
if (!fileExist) {
140140
throw Error('PST file upload not finished yet, please wait.');
141141
}
142-
143142
return true;
144143
} catch (error) {
145144
logger.error({ error, credentials: this.credentials }, 'PST file validation failed.');
@@ -289,8 +288,8 @@ export class PSTConnector implements IEmailConnector {
289288
emlBuffer ?? Buffer.from(parsedEmail.text || parsedEmail.html || '', 'utf-8')
290289
)
291290
.digest('hex')}-${createHash('sha256')
292-
.update(emlBuffer ?? Buffer.from(msg.subject || '', 'utf-8'))
293-
.digest('hex')}-${msg.clientSubmitTime?.getTime()}`;
291+
.update(emlBuffer ?? Buffer.from(msg.subject || '', 'utf-8'))
292+
.digest('hex')}-${msg.clientSubmitTime?.getTime()}`;
294293
}
295294
return {
296295
id: messageId,

0 commit comments

Comments
 (0)