From 20e0cd77789b7d3c52d5067e48da321dbcd5787e Mon Sep 17 00:00:00 2001 From: Guillermo Rauch Date: Thu, 18 Aug 2016 20:26:41 -0700 Subject: [PATCH] secrets: fix rename --- lib/secrets.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/secrets.js b/lib/secrets.js index 3c3dc1e..a196dfb 100644 --- a/lib/secrets.js +++ b/lib/secrets.js @@ -73,11 +73,11 @@ export default class Secrets extends Now { rename (nameOrId, newName) { return this.retry(async (bail, attempt) => { 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', - body: JSON.stringify({ + body: { name: newName - }) + } }); if (this._debug) console.timeEnd(`> [debug] #${attempt} PATCH /secrets/${nameOrId}`);