1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-12-28 00:06:53 +01:00

minor cleanup

This commit is contained in:
ivaosthu 2016-12-02 16:20:13 +01:00
parent c32f29e66b
commit 69e2827d9a
2 changed files with 5 additions and 15 deletions

View File

@ -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));
}
};

View File

@ -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));
}
};