From 4e21edce6b034312f121db4dce716e82ff7d5eaa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karol=20S=C3=B3jko?= Date: Thu, 13 Oct 2022 12:09:08 +0200 Subject: [PATCH] fix(websockets): add http client binding --- packages/websockets/src/Bootstrap/Container.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/websockets/src/Bootstrap/Container.ts b/packages/websockets/src/Bootstrap/Container.ts index e5507d983..9062207e5 100644 --- a/packages/websockets/src/Bootstrap/Container.ts +++ b/packages/websockets/src/Bootstrap/Container.ts @@ -1,4 +1,5 @@ import * as winston from 'winston' +import axios, { AxiosInstance } from 'axios' import Redis from 'ioredis' import * as AWS from 'aws-sdk' import { Container } from 'inversify' @@ -124,6 +125,7 @@ export class ContainerConfigLoader { .to(WebSocketMessageRequestedEventHandler) // Services + container.bind(TYPES.HTTPClient).toConstantValue(axios.create()) container .bind>(TYPES.CrossServiceTokenDecoder) .toConstantValue(new TokenDecoder(container.get(TYPES.AUTH_JWT_SECRET)))