log endpoint hostname

This commit is contained in:
Bruno Windels 2021-03-22 19:23:01 +01:00
parent f92f3b2c21
commit d5b12fa7f9

View file

@ -21,6 +21,12 @@ export class Pusher {
}
async enable(hsApi, log) {
try {
let endpointDomain = new URL(this._description.data.endpoint).host;
log.set("endpoint", endpointDomain);
} catch {
log.set("endpoint", null);
}
await hsApi.setPusher(this._description, {log}).response();
}