mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-04 02:09:37 +02:00
Introduce socket io command
This commit is contained in:
parent
65e6e2602c
commit
87e2635a50
7 changed files with 28 additions and 28 deletions
15
shared/extra-utils/socket/socket-io-command.ts
Normal file
15
shared/extra-utils/socket/socket-io-command.ts
Normal file
|
@ -0,0 +1,15 @@
|
|||
import { io } from 'socket.io-client'
|
||||
import { AbstractCommand, OverrideCommandOptions } from '../shared'
|
||||
|
||||
export class SocketIOCommand extends AbstractCommand {
|
||||
|
||||
getUserNotificationSocket (options: OverrideCommandOptions = {}) {
|
||||
return io(this.server.url + '/user-notifications', {
|
||||
query: { accessToken: this.server.accessToken }
|
||||
})
|
||||
}
|
||||
|
||||
getLiveNotificationSocket () {
|
||||
return io(this.server.url + '/live-videos')
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue