You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
bit4sat/web/src/AdminView.vue

33 lines
689 B
Vue

<template>
<div id="admin">
<p v-show="apiDone">Current balance: {{balance}}</p>
<textarea name="payreqRedeem"></textarea>
<button name="redeem">Redeem</button>
</div>
</template>
<script>
import Api from './api.js'
export default {
name: 'AdminView',
data(){
return {
balance: 0,
apiDone: false,
}
},
props: ['adminToken'],
created(){
let self = this
Api.adminInfo(this.adminToken)
.then((res)=>{
res.json().then((data)=>{
self.balance = data.msat_avail
self.apiDone = true
})
})
}
}
</script>