diff --git a/frontend/app.vue b/frontend/app.vue index 7ee388d..4da6253 100644 --- a/frontend/app.vue +++ b/frontend/app.vue @@ -120,6 +120,22 @@ const setupNotifications = () => { (token) => { // alert('Push registration success, token: ' + token.value); registrationToken.value = token + + + fetch('https://api.xeovalyte.com/subscribetotopic', { + method: 'POST', + headers: { + Authorization: 'Basic WGVvdmFseXRlOmtNKjhuRXMzNTchalJlXm1KYnZrRSFOIw==', + 'content-type': 'application/json' + }, + body: JSON.stringify({ topic: 'all', registrationToken: currentToken }) + }).then(response => response.json()) + .then(response => { + console.log(response) + }) + .catch(err => { + console.log(err) + }); } );