fix: tests

/cc @pitaj
This commit is contained in:
Julian Lam
2021-02-04 14:34:51 -05:00
parent 5e5d37c38f
commit 492cbc6227

View File

@@ -41,7 +41,7 @@ module.exports = function (Posts) {
if (isMainPost) {
const tid = await Posts.getPostField(pid, 'tid');
let thumbs = await topics.thumbs.get(tid);
thumbs = thumbs.map(thumb => thumb.url.replace(path.join(nconf.get('upload_url'), 'files/'), '')).filter(path => !validator.isURL(path, {
thumbs = thumbs.map(thumb => thumb.url.replace(path.join(nconf.get('relative_path'), nconf.get('upload_url'), 'files/'), '')).filter(path => !validator.isURL(path, {
require_protocol: true,
}));
uploads.push(...thumbs);