From cef534ed53e4518fe0acf581bfe880788d42fc36 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 26 Dec 2018 10:36:24 +0100 Subject: Add user notification base code --- shared/utils/socket/socket-io.ts | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 shared/utils/socket/socket-io.ts (limited to 'shared/utils/socket/socket-io.ts') diff --git a/shared/utils/socket/socket-io.ts b/shared/utils/socket/socket-io.ts new file mode 100644 index 000000000..854ab71af --- /dev/null +++ b/shared/utils/socket/socket-io.ts @@ -0,0 +1,13 @@ +import * as io from 'socket.io-client' + +function getUserNotificationSocket (serverUrl: string, accessToken: string) { + return io(serverUrl + '/user-notifications', { + query: { accessToken } + }) +} + +// --------------------------------------------------------------------------- + +export { + getUserNotificationSocket +} -- cgit v1.2.3