Browse Source

Await all fetches

master
Tony Kovanen 9 years ago
parent
commit
887f3e39b9
  1. 4
      lib/alias.js

4
lib/alias.js

@ -54,7 +54,7 @@ export default class Alias extends Now {
async createAlias (depl, alias) {
return this.retry(async (bail, attempt) => {
if (this._debug) console.time(`> [debug] /now/deployments/${depl.uid}/aliases #${attempt}`);
const res = this._fetch(`/now/deployments/${depl.uid}/aliases`, {
const res = await this._fetch(`/now/deployments/${depl.uid}/aliases`, {
method: 'POST',
body: { alias }
});
@ -137,7 +137,7 @@ export default class Alias extends Now {
async createCert (domain) {
return this.retry(async (bail, attempt) => {
if (this._debug) console.time(`> [debug] /certs #${attempt}`);
const res = this._fetch('/certs', {
const res = await this._fetch('/certs', {
method: 'POST',
body: {
domains: [domain]

Loading…
Cancel
Save