mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-03 17:59:37 +02:00
shared/ typescript types dir server-commands
This commit is contained in:
parent
6b5f72beda
commit
bf54587a3e
242 changed files with 228 additions and 172 deletions
15
shared/server-commands/socket/socket-io-command.ts
Normal file
15
shared/server-commands/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: options.token ?? this.server.accessToken }
|
||||
})
|
||||
}
|
||||
|
||||
getLiveNotificationSocket () {
|
||||
return io(this.server.url + '/live-videos')
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue