diff options
Diffstat (limited to 'shared/extra-utils/socket/socket-io.ts')
-rw-r--r-- | shared/extra-utils/socket/socket-io.ts | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/shared/extra-utils/socket/socket-io.ts b/shared/extra-utils/socket/socket-io.ts new file mode 100644 index 000000000..854ab71af --- /dev/null +++ b/shared/extra-utils/socket/socket-io.ts | |||
@@ -0,0 +1,13 @@ | |||
1 | import * as io from 'socket.io-client' | ||
2 | |||
3 | function getUserNotificationSocket (serverUrl: string, accessToken: string) { | ||
4 | return io(serverUrl + '/user-notifications', { | ||
5 | query: { accessToken } | ||
6 | }) | ||
7 | } | ||
8 | |||
9 | // --------------------------------------------------------------------------- | ||
10 | |||
11 | export { | ||
12 | getUserNotificationSocket | ||
13 | } | ||