Browse Source

secrets: fix rename

master
Guillermo Rauch 9 years ago
parent
commit
20e0cd7778
  1. 6
      lib/secrets.js

6
lib/secrets.js

@ -73,11 +73,11 @@ export default class Secrets extends Now {
rename (nameOrId, newName) { rename (nameOrId, newName) {
return this.retry(async (bail, attempt) => { return this.retry(async (bail, attempt) => {
if (this._debug) console.time(`> [debug] #${attempt} PATCH /secrets/${nameOrId}`); if (this._debug) console.time(`> [debug] #${attempt} PATCH /secrets/${nameOrId}`);
const res = await this._fetch('/secrets', { const res = await this._fetch(`/secrets/${nameOrId}`, {
method: 'PATCH', method: 'PATCH',
body: JSON.stringify({ body: {
name: newName name: newName
}) }
}); });
if (this._debug) console.timeEnd(`> [debug] #${attempt} PATCH /secrets/${nameOrId}`); if (this._debug) console.timeEnd(`> [debug] #${attempt} PATCH /secrets/${nameOrId}`);

Loading…
Cancel
Save