mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-21 01:46:28 +08:00
core: fix #114
This commit is contained in:
1 parent
dfd369ba57
commit
83ad274bc1
2 files changed
+2
-2
No files matched your search
@@ -23,7 +23,7 @@ class MongoService implements BaseService {
|
||||
|
||||
static buildUrl(opts: MongoConfig) {
|
||||
let mongourl = `${opts.protocol || 'mongodb'}://`;
|
||||
if (opts.username) mongourl += `${opts.username}:${opts.password}@`;
|
||||
if (opts.username) mongourl += `${opts.username}:${encodeURIComponent(opts.password)}@`;
|
||||
mongourl += `${opts.host}:${opts.port}/${opts.name}`;
|
||||
if (opts.url) mongourl = opts.url;
|
||||
return mongourl;
|
||||
|
||||
Reference in new issue
Block a user