mirror of
https://iceshrimp.dev/limepotato/jormungandr-bite.git
synced 2024-11-22 01:47:39 -07:00
Refactoring (#2160)
This commit is contained in:
parent
7840b1ab92
commit
ace81febb7
1 changed files with 1 additions and 3 deletions
|
@ -3,9 +3,7 @@ import config from '../config';
|
||||||
const u = config.mongodb.user ? encodeURIComponent(config.mongodb.user) : null;
|
const u = config.mongodb.user ? encodeURIComponent(config.mongodb.user) : null;
|
||||||
const p = config.mongodb.pass ? encodeURIComponent(config.mongodb.pass) : null;
|
const p = config.mongodb.pass ? encodeURIComponent(config.mongodb.pass) : null;
|
||||||
|
|
||||||
const uri = u && p
|
const uri = `mongodb://${u && p ? `${u}:${p}@` : ''}${config.mongodb.host}:${config.mongodb.port}/${config.mongodb.db}`;
|
||||||
? `mongodb://${u}:${p}@${config.mongodb.host}:${config.mongodb.port}/${config.mongodb.db}`
|
|
||||||
: `mongodb://${config.mongodb.host}:${config.mongodb.port}/${config.mongodb.db}`;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* monk
|
* monk
|
||||||
|
|
Loading…
Reference in a new issue