mirror of
https://github.com/strapi/strapi.git
synced 2025-11-01 18:33:55 +00:00
Mongoose updated to 5.0.0-rc1
This commit is contained in:
parent
d9af887dc9
commit
d2fae1dfdc
@ -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
|
||||
|
||||
@ -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"
|
||||
|
||||
@ -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);
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user