1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-01-11 00:08:30 +01:00
This commit is contained in:
Ivar 2016-11-02 23:24:23 +01:00 committed by Ivar Conradi Østhus
parent 6b6b400847
commit fba30e359a

View File

@ -26,7 +26,11 @@ module.exports = function (db) {
.where('app_name', appName)
.map(row => ({ count: row.count }))
.then(rows => {
return rows[0].count > 0 ? update(appName, strategies) : insert(appName, strategies);
if (rows[0].count > 0) {
return update(appName, strategies);
} else {
return insert(appName, strategies);
}
});
}