rsibot-utils 1.0.5 → 1.0.8

Sign up to get free protection for your applications and to get access to all the features.
package/db.js CHANGED
@@ -1,10 +1,9 @@
1
1
  const mongoose = require('mongoose');
2
- const { DB_USER, DB_PASSWORD } = require('./config');
2
+ const { DB_USER, DB_PASSWORD } = process.env;
3
3
  const utils = require('./index.js');
4
4
 
5
5
  mongoose.Promise = global.Promise;
6
6
  const { Schema } = mongoose;
7
- // Create a schema
8
7
 
9
8
  const hotCoinsSchema = new Schema(
10
9
  {
@@ -35,7 +34,6 @@ const queueSchema = new Schema(
35
34
  },
36
35
  );
37
36
 
38
- // Create a model
39
37
  mongoose
40
38
  .connect(`mongodb+srv://${DB_USER}:${DB_PASSWORD}@rsi-bot.d6kbq.mongodb.net/rsi?retryWrites=true&w=majority`, {
41
39
  useNewUrlParser: true,
package/index.js CHANGED
@@ -3,13 +3,11 @@ 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
- const cname = process.env.CNAME;
8
- const LOGS_PATH = cname?`${cname}_logs.txt`:"commander_logs.txt";
6
+ const CNAME = process.env.CNAME;
7
+ const LOGS_PATH = CNAME?`${CNAME}_logs.txt`:"commander_logs.txt";
9
8
 
10
- module.exports = {
9
+ module.exports = {
11
10
  ...dbUtils,
12
- ...config,
13
11
  sortByPercent: function (a, b) {
14
12
  return b.percentChange - a.percentChange;
15
13
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rsibot-utils",
3
- "version": "1.0.5",
3
+ "version": "1.0.8",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
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
-