Removed duplicate update check error hanlindg

refs https://github.com/TryGhost/Team/issues/726

- Update check service is self contained and handles errors through logging internally. There is no visible upside to do the same logging in multiple places
This commit is contained in:
Naz 2021-05-26 15:52:14 +04:00
parent 576f1438ee
commit 88564751f9

View File

@ -2,7 +2,6 @@ const debug = require('ghost-ignition').debug('web:admin:controller');
const path = require('path');
const config = require('../../../shared/config');
const updateCheck = require('../../update-check');
const logging = require('../../../shared/logging');
/**
* @description Admin controller to handle /ghost/ requests.
@ -16,10 +15,7 @@ module.exports = function adminController(req, res) {
debug('index called');
// CASE: trigger update check unit and let it run in background, don't block the admin rendering
updateCheck()
.catch((err) => {
logging.error(err);
});
updateCheck();
const defaultTemplate = config.get('env') === 'production' ? 'default-prod.html' : 'default.html';
const templatePath = path.resolve(config.get('paths').adminViews, defaultTemplate);