From 0c0c6854f25f6b3f925deb6254799a90f8d18f9e Mon Sep 17 00:00:00 2001 From: Guillermo Rauch Date: Fri, 27 May 2016 14:21:03 -0700 Subject: [PATCH] alias: use global retry --- lib/alias.js | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/lib/alias.js b/lib/alias.js index fe17698..e68b1a0 100644 --- a/lib/alias.js +++ b/lib/alias.js @@ -1,12 +1,10 @@ -import retry from './retry'; +import retry from 'async-retry'; import Now from '../lib'; export default class Alias extends Now { - async ls (url) { - console.log('list', url); - const deploymentId = url; // TODO get from API + async ls () { return retry(async (bail) => { - const res = await this._fetch(`/now/aliases/${deploymentId}/`); + const res = await this._fetch('/now/aliases'); if (200 !== res.status && (400 <= res.status || 500 > res.status)) { if (this._debug) console.log('> [debug] bailing on creating due to %s', res.status);