mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-23 02:41:50 +03:00
050f1751c4
refs #5091 - remove the use of functions - remove unnecessary quotes from tag filter - move channel config to be a JSOn file called config.channels.json - accept external config - new channelUtils for tests - remove channelConfig.get - refactor so tests work as expected - refactor away duplicate 'name' value
15 lines
479 B
JavaScript
15 lines
479 B
JavaScript
var defaultChannels = require('../../server/controllers/frontend/config.channels.json');
|
|
|
|
// This is a function to get a fake or test channel
|
|
// It's currently based on the default config in Ghost itself
|
|
module.exports.getTestChannel = function getTestChannel(channelName) {
|
|
var channel = defaultChannels[channelName];
|
|
channel.name = channelName;
|
|
|
|
return channel;
|
|
};
|
|
|
|
module.exports.getDefaultChannels = function getDefaultChannels() {
|
|
return defaultChannels;
|
|
};
|