Skip to content

Commit

Permalink
updateAllData need user object
Browse files Browse the repository at this point in the history
  • Loading branch information
Pierre-Gilles committed Oct 12, 2018
1 parent 0d90588 commit 13b2e5c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 17 deletions.
9 changes: 0 additions & 9 deletions api/core/task/task.dbMigration.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,15 +90,6 @@ module.exports = function(oldVersion) {

}

if(semver.lt(oldVersion, '3.10.1')) {

return gladys.update.updateAllData()

// finishing migration
.then(() => gladys.task.updateDbVersion('3.10.1'))
.then(() => gladys.task.dbMigration('3.10.1'));
}

// default, we save in DB the current version of Gladys
return gladys.task.updateDbVersion(gladys.version);
};
16 changes: 8 additions & 8 deletions api/core/update/update.updateAllData.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
const Promise = require('bluebird');

module.exports = function() {
module.exports = function(user) {
return Promise.all([
gladys.update.getActions(),
gladys.update.getAnswers(),
gladys.update.getBoxTypes(),
gladys.update.getCategories(),
gladys.update.getEvents(),
gladys.update.getSentences(),
gladys.update.getStates()
gladys.update.getActions(user),
gladys.update.getAnswers(user),
gladys.update.getBoxTypes(user),
gladys.update.getCategories(user),
gladys.update.getEvents(user),
gladys.update.getSentences(user),
gladys.update.getStates(user)
]);
};

0 comments on commit 13b2e5c

Please sign in to comment.