Browse Source

alias: move listing aliases and retrying to `index`

master
Guillermo Rauch 9 years ago
parent
commit
02ea07cf1a
  1. 14
      lib/alias.js

14
lib/alias.js

@ -15,18 +15,10 @@ export default class Alias extends Now {
throw err;
}
return this.retry(async (bail, attempt) => {
const res = await this._fetch(`/now/deployments/${target.uid}/aliases`);
const body = await res.json();
return body.aliases;
});
return this.listAliases(target.uid);
} else {
return this.listAliases();
}
return this.retry(async (bail, attempt) => {
const res = await this._fetch('/now/aliases');
const body = await res.json();
return body.aliases;
});
}
async rm (_alias) {

Loading…
Cancel
Save