From 7665adf7d1a5ddd2354a1f648b2170cc9f10b0c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Soner=20U=C5=9Fakl=C4=B1?= Date: Sat, 13 Feb 2021 01:43:52 -0500 Subject: [PATCH] fix: missing awaits, possible test fix --- src/topics/thumbs.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/topics/thumbs.js b/src/topics/thumbs.js index 6400f5af58..df94024e08 100644 --- a/src/topics/thumbs.js +++ b/src/topics/thumbs.js @@ -89,7 +89,7 @@ Thumbs.associate = async function ({ id, path, score }) { // Associate thumbnails with the main pid (only on local upload) if (!isDraft && isLocal) { const mainPid = (await topics.getMainPids([id]))[0]; - posts.uploads.associate(mainPid, path.replace('/files/', '')); + await posts.uploads.associate(mainPid, path.replace('/files/', '')); } }; @@ -131,7 +131,7 @@ Thumbs.delete = async function (id, relativePath) { await db.deleteObjectField(`topic:${id}`, 'numThumbs'); } const mainPid = (await topics.getMainPids([id]))[0]; - posts.uploads.dissociate(mainPid, relativePath.replace('/files/', '')); + await posts.uploads.dissociate(mainPid, relativePath.replace('/files/', '')); } } };