mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-01-02 22:00:34 +01:00
update deprecated sendfile
This commit is contained in:
@@ -335,9 +335,9 @@ adminController.themes.get = function(req, res, next) {
|
||||
var themeConfig = require(path.join(themeDir, 'theme.json')),
|
||||
screenshotPath = path.join(themeDir, themeConfig.screenshot);
|
||||
if (themeConfig.screenshot && fs.existsSync(screenshotPath)) {
|
||||
res.sendfile(screenshotPath);
|
||||
res.sendFile(screenshotPath);
|
||||
} else {
|
||||
res.sendfile(path.join(__dirname, '../../public/images/themes/default.png'));
|
||||
res.sendFile(path.join(__dirname, '../../public/images/themes/default.png'));
|
||||
}
|
||||
} else {
|
||||
return next();
|
||||
|
||||
Reference in New Issue
Block a user