log userid

This commit is contained in:
Cassie Tarakajian 2018-01-08 14:41:27 -05:00
parent 26b37b6ec7
commit b4833a6fb1

View file

@ -45,6 +45,7 @@ Project.count({}).exec().then((numProjects) => {
async.eachSeries(project.files, (file, fileCb) => { async.eachSeries(project.files, (file, fileCb) => {
if (file.url && file.url.includes(process.env.S3_BUCKET) && !file.url.includes(userId)) { if (file.url && file.url.includes(process.env.S3_BUCKET) && !file.url.includes(userId)) {
console.log(file.url); console.log(file.url);
console.log(userId);
const key = file.url.split('/').pop(); const key = file.url.split('/').pop();
console.log(key); console.log(key);
const params = { const params = {
@ -56,6 +57,7 @@ Project.count({}).exec().then((numProjects) => {
client.moveObject(params) client.moveObject(params)
.on('err', (err) => { .on('err', (err) => {
console.log(err); console.log(err);
fileCb();
}) })
.on('end', () => { .on('end', () => {
file.url = (process.env.S3_BUCKET_URL_BASE || file.url = (process.env.S3_BUCKET_URL_BASE ||