mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-02-10 08:37:31 +01:00
fixes theme screenshots in acp
This commit is contained in:
@@ -6,7 +6,7 @@ var fs = require('fs');
|
||||
var themesController = {};
|
||||
|
||||
themesController.get = function(req, res, next) {
|
||||
var themeDir = path.join(__dirname, '../../node_modules/' + req.params.theme);
|
||||
var themeDir = path.join(__dirname, '../../../node_modules/' + req.params.theme);
|
||||
fs.exists(themeDir, function(exists) {
|
||||
if (exists) {
|
||||
var themeConfig = require(path.join(themeDir, 'theme.json')),
|
||||
@@ -14,7 +14,7 @@ themesController.get = function(req, res, next) {
|
||||
if (themeConfig.screenshot && fs.existsSync(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