mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-18 07:51:55 +03:00
6f6c8f4521
refs #9178 - avoid importing 4 modules (logging, errors, events and i18n) - simply require common in each file
28 lines
509 B
JavaScript
28 lines
509 B
JavaScript
// # Slack API
|
|
// API for sending Test Notifications to Slack
|
|
var Promise = require('bluebird'),
|
|
common = require('../lib/common'),
|
|
slack;
|
|
|
|
/**
|
|
* ## Slack API Method
|
|
*
|
|
* **See:** [API Methods](index.js.html#api%20methods)
|
|
* @typedef Slack
|
|
* @param slack
|
|
*/
|
|
slack = {
|
|
/**
|
|
* ### SendTest
|
|
* Send a test notification
|
|
*
|
|
* @public
|
|
*/
|
|
sendTest: function () {
|
|
common.events.emit('slack.test');
|
|
return Promise.resolve();
|
|
}
|
|
};
|
|
|
|
module.exports = slack;
|