removed sourceId where it's not necessary (stored in CLS instead)

This commit is contained in:
azivner
2018-03-30 19:41:54 -04:00
parent 795d50f02e
commit 5d203b2278
16 changed files with 67 additions and 85 deletions

View File

@@ -38,8 +38,6 @@ async function cleanupSoftDeletedItems() {
}
async function cleanupUnusedImages() {
const sourceId = req.headers.source_id;
const unusedImageIds = await sql.getColumn(`
SELECT images.imageId
FROM images
@@ -56,7 +54,7 @@ async function cleanupUnusedImages() {
await sql.execute("UPDATE images SET isDeleted = 1, data = null, dateModified = ? WHERE imageId = ?",
[now, imageId]);
await sync_table.addImageSync(imageId, sourceId);
await sync_table.addImageSync(imageId);
}
}