|
@@ -1,7 +1,7 @@
|
|
|
<template>
|
|
|
<div>
|
|
|
<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>
|
|
|
</template>
|
|
@@ -45,7 +45,9 @@ export default class AdminCommands extends Vue {
|
|
|
this.socket = socket;
|
|
|
}
|
|
|
|
|
|
- sendRequest(keyword, options = {}) {
|
|
|
+ sendRequest(request) {
|
|
|
+ const keyword = request.keyword
|
|
|
+ const options = {}
|
|
|
this.socket.emit('admin_request',{ request: keyword, options }, (data)=>{
|
|
|
console.log({ got: data })
|
|
|
})
|