Browse Source

alias: use global retry

master
Guillermo Rauch 9 years ago
parent
commit
0c0c6854f2
  1. 8
      lib/alias.js

8
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);

Loading…
Cancel
Save