Browse Source

index: add `listSecrets` method

master
Guillermo Rauch 9 years ago
parent
commit
08801432c6
  1. 10
      lib/index.js

10
lib/index.js

@ -312,6 +312,16 @@ export default class Now extends EventEmitter {
uploadChunk();
}
async listSecrets () {
return this.retry(async (bail, attempt) => {
if (this._debug) console.time(`> [debug] #${attempt} GET /secrets`);
const res = await this._fetch('/now/secrets');
if (this._debug) console.timeEnd(`> [debug] #${attempt} GET /secrets`);
const body = await res.json();
return body.secrets;
});
}
async list (app) {
const query = app ? `?app=${encodeURIComponent(app)}` : '';

Loading…
Cancel
Save