Skip to content

Commit

Permalink
fix: tests
Browse files Browse the repository at this point in the history
/cc @pitaj
  • Loading branch information
julianlam committed Feb 4, 2021
1 parent 5e5d37c commit 492cbc6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/posts/uploads.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 492cbc6

Please sign in to comment.