Browse Source

Basic `alias rm`

master
Tony Kovanen 9 years ago
parent
commit
21bb73b3c8
  1. 15
      lib/alias.js

15
lib/alias.js

@ -18,6 +18,21 @@ export default class Alias extends Now {
return body.aliases; return body.aliases;
} }
async rm (alias) {
const res = await this._fetch(`/now/aliases/${alias}`, {
method: 'DELETE'
});
const body = await res.json();
if (res.status !== 200) {
const err = new Error('Deletion failed ' + body);
err.userError = true;
throw err;
}
console.log(`${chalk.cyan('> Success!')}`);
}
async set (deployment, alias) { async set (deployment, alias) {
const list = await this.list(); const list = await this.list();
let key, val; let key, val;

Loading…
Cancel
Save