From 02ea07cf1af4e4f1a5b8d8569543461fa667919c Mon Sep 17 00:00:00 2001 From: Guillermo Rauch Date: Fri, 10 Jun 2016 16:16:45 -0700 Subject: [PATCH] alias: move listing aliases and retrying to `index` --- lib/alias.js | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) 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) {