1
1
mirror of https://github.com/kokonect-link/cherrypick synced 2024-12-12 21:58:58 +09:00

Update mios.ts

This commit is contained in:
syuilo 2017-11-21 05:37:29 +09:00 committed by GitHub
parent c598a9cba2
commit cad1e0458f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -189,8 +189,8 @@ export default class MiOS extends EventEmitter {
// Register
this.api('sw/register', {
endpoint: subscription.endpoint,
auth: subscription.getKey('auth') ? btoa(String.fromCharCode.apply(null, new Uint8Array(subscription.getKey('auth')))) : '',
publickey: subscription.getKey('p256dh') ? btoa(String.fromCharCode.apply(null, new Uint8Array(subscription.getKey('p256dh')))) : ''
auth: btoa(String.fromCharCode.apply(null, new Uint8Array(subscription.getKey('auth')))),
publickey: btoa(String.fromCharCode.apply(null, new Uint8Array(subscription.getKey('p256dh'))))
});
}).then(() => {
console.log('Server Stored Subscription.');