harcon-radiation
Advanced tools
Comparing version 1.3.0 to 1.3.5
@@ -218,3 +218,3 @@ var ES7 = require('./ES7Fixer'); | ||
this.restify = rest.create( options || {} ); | ||
this.restify = rest; //rest.create( options || {} ); | ||
this.REST = { }; | ||
@@ -229,4 +229,6 @@ this.logger.radiationlog( null, 'REST service has been activated.', {}, this.logLevel ); | ||
if( !options.attributesRespected ) | ||
options.attributesRespected = options.attributesRespected; | ||
self.attributesRespected.forEach( function( attributeRespected ){ | ||
if( !rest.config.attributesRespected.includes(attributeRespected) ) | ||
rest.config.attributesRespected.push(attributeRespected); | ||
} ); | ||
@@ -243,3 +245,3 @@ return this.restify.processRequest(); | ||
var security = fs.object.security || {}; | ||
if( security.apiKeys && !security.apiKeys.contains( data.apiKey ) ) | ||
if( security.apiKeys && !security.apiKeys.includes( data.apiKey ) ) | ||
return callback( null, false ); | ||
@@ -246,0 +248,0 @@ if( security.iohalter ) |
{ | ||
"name": "harcon-radiation", | ||
"version": "1.3.0", | ||
"version": "1.3.5", | ||
"description": "REST and Websocket plugin for harcon", | ||
@@ -50,3 +50,3 @@ "keywords": [ | ||
}, | ||
"_id": "harcon-radiation@1.3.0" | ||
"_id": "harcon-radiation@1.3.5" | ||
} |
@@ -18,4 +18,4 @@ var chai = require('chai'), | ||
var rest = require('connect-rest'); | ||
var httphelper = rest.httphelper(); | ||
var Rest = require('connect-rest'); | ||
var httphelper = Rest.httphelper(); | ||
@@ -84,3 +84,4 @@ var io = require('socket.io'); | ||
}; | ||
app.use( radiation.rester( rest, options ) ); | ||
var rester = Rest.create( options ); | ||
app.use( radiation.rester( rester ) ); | ||
@@ -87,0 +88,0 @@ var port = process.env.PORT || 8080; |
42515
482