Mongoose updated to 5.0.0-rc1

This commit is contained in:
Nikolay 2018-01-08 17:50:57 +03:00
parent d9af887dc9
commit d2fae1dfdc
3 changed files with 4 additions and 8 deletions

View File

@ -44,13 +44,9 @@ module.exports = function (strapi) {
// Connect to mongo database
if (_.isEmpty(username) || _.isEmpty(password)) {
instance.connect(`mongodb://${host}:${port}/${database}`, {
useMongoClient: true
});
instance.connect(`mongodb://${host}:${port}/${database}`);
} else {
instance.connect(`mongodb://${username}:${password}@${host}:${port}/${database}`, {
useMongoClient: true
});
instance.connect(`mongodb://${username}:${password}@${host}:${port}/${database}`);
}
// Handle error

View File

@ -16,7 +16,7 @@
"main": "./lib",
"dependencies": {
"lodash": "^4.17.4",
"mongoose": "^4.11.10",
"mongoose": "^5.0.0-rc1",
"mongoose-float": "^1.0.2",
"pluralize": "^6.0.0",
"strapi-utils": "3.0.0-alpha.7.3"

View File

@ -159,7 +159,7 @@ export class Edit extends React.Component {
if (isObject(e.target.value) && e.target.value._isAMomentObject === true) {
formattedValue = moment(e.target.value, 'YYYY-MM-DD HH:mm:ss').format();
} else if (['float', 'integer', 'bigint'].indexOf(currentSchema.fields[e.target.name].type) !== -1) {
} else if (['float', 'integer', 'biginteger', 'decimal'].indexOf(currentSchema.fields[e.target.name].type) !== -1) {
formattedValue = toNumber(e.target.value);
}