Browse Source

index: simplify `_fetch`

master
Guillermo Rauch 9 years ago
parent
commit
21ea9859a2
  1. 4
      lib/index.js

4
lib/index.js

@ -278,10 +278,10 @@ export default class Now extends EventEmitter {
return this._syncAmount; return this._syncAmount;
} }
async _fetch (_url, opts = {}) { _fetch (_url, opts = {}) {
opts.headers = opts.headers || {}; opts.headers = opts.headers || {};
opts.headers.authorization = `Bearer ${this._token}`; opts.headers.authorization = `Bearer ${this._token}`;
return await this._agent.fetch(_url, opts); return this._agent.fetch(_url, opts);
} }
} }

Loading…
Cancel
Save