remove WS and add memberUpdate.

This commit is contained in:
Miroslav Šedivý 2020-12-03 20:46:54 +01:00
parent 052eb3cade
commit fb4f1d68cc

View File

@ -196,23 +196,19 @@
public requestControl() { public requestControl() {
this.api.user.controlRequest() this.api.user.controlRequest()
//this.websocket.send('control/request')
} }
public releaseControl() { public releaseControl() {
this.api.user.controlRelease() this.api.user.controlRelease()
//this.websocket.send('control/release')
} }
public takeControl() { public takeControl() {
this.api.admin.controlTake() this.api.admin.controlTake()
//this.websocket.send('control/take')
} }
public giveControl(id: string) { public giveControl(id: string) {
const controlTargetPayload = { id } const controlTargetPayload = { id }
this.api.admin.controlGive({ controlTargetPayload }) this.api.admin.controlGive({ controlTargetPayload })
//this.websocket.send('control/give', { id })
} }
public resetControl() { public resetControl() {
@ -238,6 +234,22 @@
this.api.admin.membersCreate({ memberDataPayload }) this.api.admin.membersCreate({ memberDataPayload })
} }
public memberUpdate(
memberId: string,
memberDataPayload: {
secret: string
name: string
isAdmin: boolean
canLogin: boolean
canConnect: boolean
canWatch: boolean
canHost: boolean
canAccessClipboard: boolean
},
) {
this.api.admin.membersUpdate({ memberId, memberDataPayload })
}
public memberDelete(memberId: string) { public memberDelete(memberId: string) {
this.api.admin.membersDelete({ memberId }) this.api.admin.membersDelete({ memberId })
} }