diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/config/environment.js | 2 | ||||
-rw-r--r-- | lib/models/revision.js | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/lib/config/environment.js b/lib/config/environment.js index 75381ffc..c108a6f9 100644 --- a/lib/config/environment.js +++ b/lib/config/environment.js @@ -6,7 +6,7 @@ module.exports = { domain: process.env.HMD_DOMAIN, urlpath: process.env.HMD_URL_PATH, port: process.env.HMD_PORT, - urladdport: process.env.HMD_URL_ADDPORT, + urladdport: toBooleanConfig(process.env.HMD_URL_ADDPORT), usessl: toBooleanConfig(process.env.HMD_USESSL), protocolusessl: toBooleanConfig(process.env.HMD_PROTOCOL_USESSL), alloworigin: process.env.HMD_ALLOW_ORIGIN ? process.env.HMD_ALLOW_ORIGIN.split(',') : undefined, diff --git a/lib/models/revision.js b/lib/models/revision.js index 6f3a746f..225a95d4 100644 --- a/lib/models/revision.js +++ b/lib/models/revision.js @@ -110,7 +110,7 @@ module.exports = function (sequelize, DataTypes) { where: { noteId: note.id }, - order: '"createdAt" DESC' + order: [['createdAt', 'DESC']] }).then(function (revisions) { var data = [] for (var i = 0, l = revisions.length; i < l; i++) { @@ -131,7 +131,7 @@ module.exports = function (sequelize, DataTypes) { where: { noteId: note.id }, - order: '"createdAt" DESC' + order: [['createdAt', 'DESC']] }).then(function (revisions) { if (revisions.length <= 0) return callback(null, null) // measure target revision position @@ -142,7 +142,7 @@ module.exports = function (sequelize, DataTypes) { $gte: time } }, - order: '"createdAt" DESC' + order: [['createdAt', 'DESC']] }).then(function (count) { if (count <= 0) return callback(null, null) sendDmpWorker({ @@ -231,7 +231,7 @@ module.exports = function (sequelize, DataTypes) { where: { noteId: note.id }, - order: '"createdAt" DESC' + order: [['createdAt', 'DESC']] }).then(function (revisions) { if (revisions.length <= 0) { // if no revision available |