diff --git a/lib/alias.js b/lib/alias.js index ba8bdc0..c5956d6 100644 --- a/lib/alias.js +++ b/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) {