Skip to content

Commit

Permalink
Improved code quality (#13020)
Browse files Browse the repository at this point in the history
  • Loading branch information
Hudell authored and rodrigok committed Dec 24, 2018
1 parent 8779fed commit af60043
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ export class Base {
this.progress = new Progress(this.info.key, this.info.name);
this.collection = RawImports;

const userId = Meteor.user()._id;
const userId = Meteor.userId();
const importRecord = Imports.findPendingImport(this.info.key);

if (importRecord) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import http from 'http';
Meteor.methods({
downloadPublicImportFile(fileUrl, importerKey) {
const userId = Meteor.userId();
console.log(fileUrl);

if (!userId) {
throw new Meteor.Error('error-invalid-user', 'Invalid user', { method: 'downloadPublicImportFile' });
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,6 @@ Meteor.methods({
const readStream = RocketChatFile.bufferToStream(file);
const writeStream = RocketChatImportFileInstance.createWriteStream(newFileName, contentType);

writeStream.on('end', Meteor.bindEnvironment(() => {
}));

readStream.pipe(writeStream);
},
});

0 comments on commit af60043

Please sign in to comment.