fix asset migration script
This commit is contained in:
parent
e140702784
commit
3b36cd1e9c
1 changed files with 1 additions and 1 deletions
|
@ -29,7 +29,7 @@ Project.find({}, (err, projects) => {
|
||||||
if (!project.user) return;
|
if (!project.user) return;
|
||||||
const userId = project.user.valueOf();
|
const userId = project.user.valueOf();
|
||||||
project.files.forEach((file, fileIndex) => {
|
project.files.forEach((file, fileIndex) => {
|
||||||
if (file.url && file.url.includes(process.env.S3_BUCKET)) {
|
if (file.url && file.url.includes(process.env.S3_BUCKET) && !file.url.includes(userId)) {
|
||||||
const key = file.url.split('/').pop();
|
const key = file.url.split('/').pop();
|
||||||
console.log(key);
|
console.log(key);
|
||||||
const params = {
|
const params = {
|
||||||
|
|
Loading…
Reference in a new issue