Skip to content

Commit a9061d5

Browse files
committed
fix: lint
1 parent d68b477 commit a9061d5

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

src/routes/attachments/create.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import Path from 'path';
1111
import { middleware as tcMiddleware } from 'tc-core-library-js';
1212
import models from '../../models';
1313
import util from '../../util';
14-
import { getDownloadUrl } from '../../services/fileService'
14+
import { getDownloadUrl } from '../../services/fileService';
1515
import { EVENT, RESOURCES, ATTACHMENT_TYPES } from '../../constants';
1616

1717
const permissions = tcMiddleware.permissions;
@@ -130,7 +130,7 @@ module.exports = [
130130
if (process.env.NODE_ENV !== 'development' || config.get('enableFileUpload') === 'true') {
131131
// retrieve download url for the response
132132
req.log.debug('retrieving download url');
133-
return getDownloadUrl(destBucket, path)
133+
return getDownloadUrl(destBucket, path);
134134
}
135135
return Promise.resolve();
136136
}).then((url) => {
@@ -152,7 +152,7 @@ module.exports = [
152152
newAttachment,
153153
);
154154
res.status(201).json(response);
155-
accept();
155+
return Promise.resolve();
156156
}
157157
let response = _.cloneDeep(newAttachment);
158158
response = _.omit(response, ['path', 'deletedAt']);

src/routes/attachments/get.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ const permissions = tcMiddleware.permissions;
1616
/**
1717
* This private function gets the pre-signed url if the attachment is a file
1818
*
19-
* @param {Object} req The http request
2019
* @param {Object} attachment The project attachment object
2120
* @returns {Array<Promise>} The array of two promises, first one if the attachment object promise,
2221
* The second promise is for the file pre-signed url (if attachment type is file)
@@ -33,7 +32,7 @@ const getPreSignedUrl = async (attachment) => {
3332
return [attachment, 'dummy://url'];
3433
}
3534
// Not in development mode or file upload is not disabled
36-
const url = await getDownloadUrl(config.get('attachmentsS3Bucket'), attachment.path)
35+
const url = await getDownloadUrl(config.get('attachmentsS3Bucket'), attachment.path);
3736
return [attachment, url];
3837
};
3938

0 commit comments

Comments
 (0)