@riocrypto/common-server 1.0.984 → 1.0.986

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,6 @@
1
1
  declare class SlackClient {
2
- private webhookUrl;
3
- constructor(webhookUrl: string);
4
- sendMessage(message: string): Promise<void>;
2
+ constructor();
3
+ sendMessageWithWebhook(message: string, webhookUrl: string): Promise<void>;
5
4
  }
6
5
  export declare const slackClient: SlackClient;
7
6
  export {};
@@ -15,13 +15,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
15
15
  exports.slackClient = void 0;
16
16
  const axios_1 = __importDefault(require("axios"));
17
17
  class SlackClient {
18
- constructor(webhookUrl) {
19
- this.webhookUrl = webhookUrl;
20
- }
21
- sendMessage(message) {
18
+ constructor() { }
19
+ sendMessageWithWebhook(message, webhookUrl) {
22
20
  return __awaiter(this, void 0, void 0, function* () {
23
21
  try {
24
- yield axios_1.default.post(this.webhookUrl, {
22
+ yield axios_1.default.post(webhookUrl, {
25
23
  text: message,
26
24
  });
27
25
  }
@@ -31,4 +29,4 @@ class SlackClient {
31
29
  });
32
30
  }
33
31
  }
34
- exports.slackClient = new SlackClient(process.env.SLACK_WEBHOOK_URL);
32
+ exports.slackClient = new SlackClient();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riocrypto/common-server",
3
- "version": "1.0.984",
3
+ "version": "1.0.986",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",
@@ -24,7 +24,7 @@
24
24
  "@aws-sdk/client-s3": "^3.297.0",
25
25
  "@everapi/currencyapi-js": "^1.0.6",
26
26
  "@google-cloud/storage": "^6.9.5",
27
- "@riocrypto/common": "^1.0.844",
27
+ "@riocrypto/common": "^1.0.847",
28
28
  "@types/express": "^4.17.13",
29
29
  "axios": "^0.27.2",
30
30
  "ccxt": "^3.0.30",