From a0908c7a5fc3e1720a31cd217c9cd8cee09aeb50 Mon Sep 17 00:00:00 2001 From: Jimmy Bosse Date: Wed, 10 Jul 2024 08:34:08 -0400 Subject: [PATCH] Use correct response status and return just the data not a circular response object. --- src/planview-client.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/planview-client.js b/src/planview-client.js index d77c16e..4543e16 100644 --- a/src/planview-client.js +++ b/src/planview-client.js @@ -29,7 +29,7 @@ class PlanviewClient { } #parseResponse(result) { - if (result.status === 200 && !!result.data.id) { + if (result.status === 201 && !!result.data.id) { return { success: true, data: result.data @@ -37,7 +37,7 @@ class PlanviewClient { } else { return { success: false, - result + data: result.data } } }