mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 08:36:12 +01:00
fix: #9045, no post usage info if '/files/' path received
This commit is contained in:
@@ -46,7 +46,7 @@ uploadsController.get = async function (req, res, next) {
|
||||
});
|
||||
|
||||
// Add post usage info if in /files
|
||||
if (req.query.dir === '/files') {
|
||||
if (['/files', '/files/'].includes(req.query.dir)) {
|
||||
const usage = await posts.uploads.getUsage(files);
|
||||
files.forEach(function (file, idx) {
|
||||
file.inPids = usage[idx].map(pid => parseInt(pid, 10));
|
||||
|
||||
Reference in New Issue
Block a user