mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-03 23:00:14 -05:00
refs #9178 - we have to take care that we don't end up in circular dependencies - e.g. API requires UrlService and UrlService needs to require the API (for requesting data) - update the references - we would like to get rid of the utils folder, this is/was the most complicated change
20 lines
682 B
JavaScript
20 lines
682 B
JavaScript
var urlService = require('../../services/url'),
|
|
settingsCache = require('../../settings/cache'),
|
|
blogIconUtils = require('../../utils/blog-icon');
|
|
|
|
function getBlogLogo() {
|
|
var logo = {};
|
|
|
|
if (settingsCache.get('logo')) {
|
|
logo.url = urlService.utils.urlFor('image', {image: settingsCache.get('logo')}, true);
|
|
} else {
|
|
// CASE: no publication logo is updated. We can try to use either an uploaded publication icon
|
|
// or use the default one to make
|
|
// Google happy with it. See https://github.com/TryGhost/Ghost/issues/7558
|
|
logo.url = blogIconUtils.getIconUrl(true);
|
|
}
|
|
|
|
return logo;
|
|
}
|
|
|
|
module.exports = getBlogLogo;
|