]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blob - shared/extra-utils/socket/socket-io.ts
Introduce bulk command
[github/Chocobozzz/PeerTube.git] / shared / extra-utils / socket / socket-io.ts
1 import { 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 function getLiveNotificationSocket (serverUrl: string) {
10 return io(serverUrl + '/live-videos')
11 }
12
13 // ---------------------------------------------------------------------------
14
15 export {
16 getUserNotificationSocket,
17 getLiveNotificationSocket
18 }