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:
parent
2e6f4187c5
commit
1caf2ddc53
@ -10,7 +10,7 @@ util.inherits(EventStore, EventEmitter);
|
|||||||
EventStore.prototype.create = function (event) {
|
EventStore.prototype.create = function (event) {
|
||||||
var that = this;
|
var that = this;
|
||||||
return eventDb.store(event).then(function() {
|
return eventDb.store(event).then(function() {
|
||||||
that.emit(event.type, event);
|
return that.emit(event.type, event);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -65,11 +65,11 @@ function rowToFeature(row) {
|
|||||||
function eventDataToRow(data) {
|
function eventDataToRow(data) {
|
||||||
return {
|
return {
|
||||||
name: data.name,
|
name: data.name,
|
||||||
description: data.description,
|
description: data.description || '',
|
||||||
enabled: data.enabled ? 1 : 0,
|
enabled: data.enabled ? 1 : 0,
|
||||||
archived: data.archived ? 1 :0,
|
archived: data.archived ? 1 :0,
|
||||||
strategy_name: data.strategy, // eslint-disable-line
|
strategy_name: data.strategy || 'default', // eslint-disable-line
|
||||||
parameters: data.parameters
|
parameters: data.parameters || {}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -50,7 +50,7 @@ function eventDataToRow(data) {
|
|||||||
return {
|
return {
|
||||||
name: data.name,
|
name: data.name,
|
||||||
description: data.description,
|
description: data.description,
|
||||||
parameters_template: data.parametersTemplate // eslint-disable-line
|
parameters_template: data.parametersTemplate || {} // eslint-disable-line
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -15,7 +15,8 @@ function createStrategies() {
|
|||||||
return Promise.map([
|
return Promise.map([
|
||||||
{
|
{
|
||||||
name: "default",
|
name: "default",
|
||||||
description: "Default on or off Strategy."
|
description: "Default on or off Strategy.",
|
||||||
|
parametersTemplate: {}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "usersWithEmail",
|
name: "usersWithEmail",
|
||||||
|
Loading…
Reference in New Issue
Block a user