|
@@ -1,7 +1,7 @@
|
|
<template>
|
|
<template>
|
|
<div>
|
|
<div>
|
|
<h3>Admin Session</h3>
|
|
<h3>Admin Session</h3>
|
|
- <div v-for="request in requestCmds" :key="request.keyword"><button></button></div>
|
|
|
|
|
|
+ <div v-for="request in requestCmds" :key="request.keyword"><button @click="sendRequest(request)">{{ request.label }} </button></div>
|
|
<div v-for="response in responses" :key="response.cnt">{{ response.data }}</div>
|
|
<div v-for="response in responses" :key="response.cnt">{{ response.data }}</div>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
@@ -45,7 +45,9 @@ export default class AdminCommands extends Vue {
|
|
this.socket = socket;
|
|
this.socket = socket;
|
|
}
|
|
}
|
|
|
|
|
|
- sendRequest(keyword, options = {}) {
|
|
|
|
|
|
+ sendRequest(request) {
|
|
|
|
+ const keyword = request.keyword
|
|
|
|
+ const options = {}
|
|
this.socket.emit('admin_request',{ request: keyword, options }, (data)=>{
|
|
this.socket.emit('admin_request',{ request: keyword, options }, (data)=>{
|
|
console.log({ got: data })
|
|
console.log({ got: data })
|
|
})
|
|
})
|