whatsapp-multi-devicewhatsapp-apiwhatsapprestgolanggobotwhatsapp-web-multi-devicewhatsapp-api-gorest-apigolang-whatsapp-apigolang-whatsapp
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
37 lines
1.1 KiB
37 lines
1.1 KiB
export default {
|
|
name: 'AppReconnect',
|
|
methods: {
|
|
async handleSubmit() {
|
|
try {
|
|
await this.submitApi()
|
|
showSuccessInfo("Reconnect success")
|
|
|
|
// fetch devices
|
|
this.$emit('reload-devices')
|
|
} catch (err) {
|
|
showErrorInfo(err)
|
|
}
|
|
},
|
|
async submitApi() {
|
|
try {
|
|
await window.http.get(`/app/reconnect`)
|
|
} catch (error) {
|
|
if (error.response) {
|
|
throw Error(error.response.data.message)
|
|
}
|
|
throw Error(error.message)
|
|
}
|
|
}
|
|
},
|
|
template: `
|
|
<div class="green card" @click="handleSubmit" style="cursor: pointer">
|
|
<div class="content">
|
|
<a class="ui teal right ribbon label">App</a>
|
|
<div class="header">Reconnect</div>
|
|
<div class="description">
|
|
Please reconnect to the WhatsApp service if your API doesn't work or if your app is down.
|
|
</div>
|
|
</div>
|
|
</div>
|
|
`
|
|
}
|