mirror of
https://github.com/strapi/strapi.git
synced 2025-09-05 14:53:01 +00:00
fix(mongoose): password require username
This commit is contained in:
parent
ec106bce41
commit
97da3ba12d
@ -46,9 +46,9 @@ module.exports = function (strapi) {
|
||||
const connectOptions = {}
|
||||
if (!_.isEmpty(username)) {
|
||||
connectOptions.user = username
|
||||
}
|
||||
if (!_.isEmpty(password)) {
|
||||
connectOptions.pass = password
|
||||
if (!_.isEmpty(password)) {
|
||||
connectOptions.pass = password
|
||||
}
|
||||
}
|
||||
instance.connect(`mongodb://${host}:${port}/${database}`, connectOptions);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user