mirror of
https://github.com/Unleash/unleash.git
synced 2024-12-28 00:06:53 +01:00
minor cleanup
This commit is contained in:
parent
c32f29e66b
commit
69e2827d9a
@ -66,36 +66,28 @@ class FeatureToggleStore {
|
||||
_createFeature (data) {
|
||||
return this.db('features')
|
||||
.insert(this.eventDataToRow(data))
|
||||
.catch(err => {
|
||||
logger.error('Could not insert feature, error was: ', err);
|
||||
});
|
||||
.catch(err => logger.error('Could not insert feature, error was: ', err));
|
||||
}
|
||||
|
||||
_updateFeature (data) {
|
||||
return this.db('features')
|
||||
.where({ name: data.name })
|
||||
.update(this.eventDataToRow(data))
|
||||
.catch(err => {
|
||||
logger.error('Could not update feature, error was: ', err);
|
||||
});
|
||||
.catch(err => logger.error('Could not update feature, error was: ', err));
|
||||
}
|
||||
|
||||
_archiveFeature (data) {
|
||||
return this.db('features')
|
||||
.where({ name: data.name })
|
||||
.update({ archived: 1 })
|
||||
.catch(err => {
|
||||
logger.error('Could not archive feature, error was: ', err);
|
||||
});
|
||||
.catch(err => logger.error('Could not archive feature, error was: ', err));
|
||||
}
|
||||
|
||||
_reviveFeature (data) {
|
||||
return this.db('features')
|
||||
.where({ name: data.name })
|
||||
.update({ archived: 0, enabled: 0 })
|
||||
.catch(err => {
|
||||
logger.error('Could not archive feature, error was: ', err);
|
||||
});
|
||||
.catch(err => logger.error('Could not archive feature, error was: ', err));
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -59,9 +59,7 @@ class StrategyStore {
|
||||
_createStrategy (data) {
|
||||
this.db(TABLE)
|
||||
.insert(this.eventDataToRow(data))
|
||||
.catch(err => {
|
||||
logger.error('Could not insert strategy, error was: ', err);
|
||||
});
|
||||
.catch(err => logger.error('Could not insert strategy, error was: ', err));
|
||||
}
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user