add restart button to frontend

This commit is contained in:
dni ⚡ 2022-09-27 16:37:08 +02:00
parent f2e494384e
commit 9757fad868

View File

@ -65,6 +65,14 @@
:options="data.funding_source"
></q-select>
<br />
<div>
<q-btn
class="q-mt-md float-right"
label="Restart Server"
color="primary"
@click="restartServer"
></q-btn>
</div>
</div>
<div class="col-12">
<p>Fee reserve</p>
@ -89,7 +97,7 @@
></q-input>
</div>
</div>
<br />
</div>
</div>
</div>
@ -1257,6 +1265,24 @@
let spaces = this.data.admin.ad_space
this.data.admin.ad_space = spaces.filter(s => s !== ad)
},
restartServer() {
LNbits.api
.request(
'GET',
'/admin/api/v1/admin/restart/',
this.g.user.wallets[0].adminkey
)
.then(response => {
this.$q.notify({
type: 'positive',
message: 'Success! Restarted Server',
icon: null
})
})
.catch(function (error) {
LNbits.utils.notifyApiError(error)
})
},
topupWallet() {
LNbits.api
.request(