fix: tests

/cc @pitaj
v1.18.x
Julian Lam 4 years ago
parent 5e5d37c38f
commit 492cbc6227

@ -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);

Loading…
Cancel
Save