rsibot-utils 1.0.5 → 1.0.6
Sign up to get free protection for your applications and to get access to all the features.
- package/db.js +1 -1
- package/index.js +3 -3
- package/package.json +1 -1
- package/config.js +0 -5
package/db.js
CHANGED
@@ -34,7 +34,7 @@ const queueSchema = new Schema(
|
|
34
34
|
versionKey: false,
|
35
35
|
},
|
36
36
|
);
|
37
|
-
|
37
|
+
const {DB_USER, DB_PASSWORD} = process.env;
|
38
38
|
// Create a model
|
39
39
|
mongoose
|
40
40
|
.connect(`mongodb+srv://${DB_USER}:${DB_PASSWORD}@rsi-bot.d6kbq.mongodb.net/rsi?retryWrites=true&w=majority`, {
|
package/index.js
CHANGED
@@ -3,13 +3,13 @@ const path = require('path');
|
|
3
3
|
const util = require('util');
|
4
4
|
const exec = util.promisify(require('child_process').exec);
|
5
5
|
const dbUtils = require('./db')
|
6
|
-
const config = require('./config')
|
7
6
|
const cname = process.env.CNAME;
|
8
7
|
const LOGS_PATH = cname?`${cname}_logs.txt`:"commander_logs.txt";
|
9
8
|
|
10
|
-
module.exports = {
|
9
|
+
module.exports = (credentials) => {
|
10
|
+
|
11
|
+
} {
|
11
12
|
...dbUtils,
|
12
|
-
...config,
|
13
13
|
sortByPercent: function (a, b) {
|
14
14
|
return b.percentChange - a.percentChange;
|
15
15
|
},
|
package/package.json
CHANGED
package/config.js
DELETED
@@ -1,5 +0,0 @@
|
|
1
|
-
module.exports.APIKEY = '09R8VYlX2u5k38wx3HyJdAeR9lrwnepzqwogKyXLLexuJhxNjWZPIUPNweiGqla8';
|
2
|
-
module.exports.APISECRET = 'Iy4k6ocN6GUaxMuLTHANS7DKJbI4hYgCz6gvYwiPq7TYbfBSycNah43zSAAq3dlY';
|
3
|
-
module.exports.DB_USER = 'shalom';
|
4
|
-
module.exports.DB_PASSWORD = 'AaSsDdFf1234';
|
5
|
-
|