1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-01-20 00:08:02 +01:00

seems like knex 0.11 is more restrict about not using undefined

This commit is contained in:
ivaosthu 2016-05-06 11:11:32 +02:00 committed by Ivar Conradi Østhus
parent 2e6f4187c5
commit 1caf2ddc53
4 changed files with 7 additions and 6 deletions

View File

@ -10,7 +10,7 @@ util.inherits(EventStore, EventEmitter);
EventStore.prototype.create = function (event) {
var that = this;
return eventDb.store(event).then(function() {
that.emit(event.type, event);
return that.emit(event.type, event);
});
};

View File

@ -65,11 +65,11 @@ function rowToFeature(row) {
function eventDataToRow(data) {
return {
name: data.name,
description: data.description,
description: data.description || '',
enabled: data.enabled ? 1 : 0,
archived: data.archived ? 1 :0,
strategy_name: data.strategy, // eslint-disable-line
parameters: data.parameters
strategy_name: data.strategy || 'default', // eslint-disable-line
parameters: data.parameters || {}
};
}

View File

@ -50,7 +50,7 @@ function eventDataToRow(data) {
return {
name: data.name,
description: data.description,
parameters_template: data.parametersTemplate // eslint-disable-line
parameters_template: data.parametersTemplate || {} // eslint-disable-line
};
}

View File

@ -15,7 +15,8 @@ function createStrategies() {
return Promise.map([
{
name: "default",
description: "Default on or off Strategy."
description: "Default on or off Strategy.",
parametersTemplate: {}
},
{
name: "usersWithEmail",