mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +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
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "hydrooj",
|
"name": "hydrooj",
|
||||||
"version": "2.23.25",
|
"version": "2.23.26",
|
||||||
"bin": "bin/hydrooj.js",
|
"bin": "bin/hydrooj.js",
|
||||||
"main": "dist/loader.js",
|
"main": "dist/loader.js",
|
||||||
"typings": "dist/loader.d.ts",
|
"typings": "dist/loader.d.ts",
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ class MongoService implements BaseService {
|
|||||||
|
|
||||||
static buildUrl(opts: MongoConfig) {
|
static buildUrl(opts: MongoConfig) {
|
||||||
let mongourl = `${opts.protocol || 'mongodb'}://`;
|
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}`;
|
mongourl += `${opts.host}:${opts.port}/${opts.name}`;
|
||||||
if (opts.url) mongourl = opts.url;
|
if (opts.url) mongourl = opts.url;
|
||||||
return mongourl;
|
return mongourl;
|
||||||
|
|||||||
Reference in new issue
Block a user