Skip to content

Commit

Permalink
Deepcode - Fix the bugs erxes#521
Browse files Browse the repository at this point in the history
  • Loading branch information
marcnet90 committed Aug 22, 2019
1 parent 625ac2a commit 0ad1363
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/data/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import * as admin from 'firebase-admin';
import * as fs from 'fs';
import * as Handlebars from 'handlebars';
import * as nodemailer from 'nodemailer';
import * as path from 'path';
import * as Path from 'path';
import * as requestify from 'requestify';
import * as xlsxPopulate from 'xlsx-populate';
import { Customers, Notifications, Users } from '../db/models';
Expand All @@ -28,7 +28,7 @@ export const checkFile = async file => {
}

// read file
const buffer = await fs.readFileSync(path.basename(file.path));
const buffer = await fs.readFileSync(Path.basename(file.path));

// determine file type using magic numbers
const ft = fileType(buffer);
Expand Down Expand Up @@ -110,7 +110,7 @@ export const uploadFileAWS = async (file: { name: string; path: string }): Promi
const fileName = `${AWS_PREFIX}${Math.random()}${file.name}`;

// read file
const buffer = await fs.readFileSync(path.basename(file.path));
const buffer = await fs.readFileSync(Path.basename(file.path));

// upload to s3
const response: any = await new Promise((resolve, reject) => {
Expand Down
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import * as fs from 'fs';
import { createServer } from 'http';
import * as path from 'path';
import * as request from 'request';
import * as xss from 'xss';
import { filterXSS } from 'xss';
import apolloServer from './apolloClient';
import { companiesExport, customersExport } from './data/modules/coc/exporter';
import insightExports from './data/modules/insights/insightExports';
Expand Down
2 changes: 1 addition & 1 deletion src/workers/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import * as dotenv from 'dotenv';
import * as express from 'express';
import * as formidable from 'formidable';
import * as path from 'path';
import * as xss from 'xss';
import { filterXSS } from 'xss';
import { checkFile } from '../data/utils';
import { connect } from '../db/connection';
import { debugRequest, debugResponse, debugWorkers } from '../debuggers';
Expand Down

0 comments on commit 0ad1363

Please sign in to comment.