mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-07-05 12:59:13 +02:00
refactor: thumbs.associate accepts both relative path and url in path arg
This commit is contained in:
@@ -130,8 +130,7 @@ Topics.addThumb = async (req, res) => {
|
||||
await Promise.all(files.map(async (fileObj) => {
|
||||
await topics.thumbs.associate({
|
||||
id: req.params.tid,
|
||||
path: fileObj.path || null,
|
||||
url: fileObj.url,
|
||||
path: fileObj.path || fileObj.url,
|
||||
});
|
||||
}));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user