mirror of
https://iceshrimp.dev/crimekillz/trashposs
synced 2024-11-23 09:23:48 +01:00
Fix bug
This commit is contained in:
parent
c4b306b3f1
commit
ef371d9bf4
@ -1,7 +1,10 @@
|
||||
import config from '../conf';
|
||||
|
||||
const uri = config.mongodb.user && config.mongodb.pass
|
||||
? `mongodb://${config.mongodb.user}:${config.mongodb.pass}@${config.mongodb.host}:${config.mongodb.port}/${config.mongodb.db}`
|
||||
const u = config.mongodb.user ? encodeURIComponent(config.mongodb.user) : null;
|
||||
const p = config.mongodb.pass ? encodeURIComponent(config.mongodb.pass) : null;
|
||||
|
||||
const uri = u && p
|
||||
? `mongodb://${u}:${p}@${config.mongodb.host}:${config.mongodb.port}/${config.mongodb.db}`
|
||||
: `mongodb://${config.mongodb.host}:${config.mongodb.port}/${config.mongodb.db}`;
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user