mirror of
https://github.com/verdaccio/verdaccio.git
synced 2025-01-27 22:59:51 -05:00
Fixed code style
This commit is contained in:
parent
adb40fc5f4
commit
fee0864ba1
1 changed files with 14 additions and 14 deletions
|
@ -20,17 +20,17 @@ var handleNotify = function(metadata, notifyEntry) {
|
|||
|
||||
// provides fallback support, it's accept an Object {} and Array of {}
|
||||
if (notifyEntry.headers && Array.isArray(notifyEntry.headers)) {
|
||||
var header = {};
|
||||
var header = {}
|
||||
notifyEntry.headers.map(function(item) {
|
||||
if (Object.is(item, item)) {
|
||||
for (var key in item) {
|
||||
header[key] = item[key];
|
||||
header[key] = item[key]
|
||||
}
|
||||
}
|
||||
});
|
||||
})
|
||||
options.headers = header;
|
||||
} else if (Object.is(notifyEntry.headers, notifyEntry.headers)) {
|
||||
options.headers = notifyEntry.headers;
|
||||
options.headers = notifyEntry.headers
|
||||
}
|
||||
|
||||
options.method = notifyEntry.method
|
||||
|
@ -41,14 +41,14 @@ var handleNotify = function(metadata, notifyEntry) {
|
|||
|
||||
request(options, function(err, response, body) {
|
||||
if (err) {
|
||||
Logger.logger.error( { err: err }, ' notify error: @{err.message}' );
|
||||
Logger.logger.error( { err: err }, ' notify error: @{err.message}' )
|
||||
} else {
|
||||
Logger.logger.info({ content: content}, 'A notification has been shipped: @{content}')
|
||||
if (body) {
|
||||
Logger.logger.debug( { body: body }, ' body: @{body}' );
|
||||
Logger.logger.debug( { body: body }, ' body: @{body}' )
|
||||
}
|
||||
}
|
||||
});
|
||||
})
|
||||
}
|
||||
|
||||
module.exports.notify = function(metadata, config) {
|
||||
|
|
Loading…
Add table
Reference in a new issue