From 8567b8dd6d8bfa2947928c02a1441c055e71da7e Mon Sep 17 00:00:00 2001 From: martyncolmer Date: Wed, 31 Jul 2024 14:41:23 +0100 Subject: [PATCH 1/2] updated id to guid --- eq-author-api/schema/resolvers/base.js | 4 ++-- eq-author-api/schema/tests/publishSchema.test.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/eq-author-api/schema/resolvers/base.js b/eq-author-api/schema/resolvers/base.js index c77225062d..deb8e25fea 100644 --- a/eq-author-api/schema/resolvers/base.js +++ b/eq-author-api/schema/resolvers/base.js @@ -1636,8 +1636,8 @@ const Resolvers = { .then(async (res) => { if (res.status === 200) { const responseJson = res.data; - - publishResult.cirId = responseJson.id; + console.log(responseJson); + publishResult.cirId = responseJson.guid; publishResult.cirVersion = responseJson.ci_version; publishResult.success = true; } else { diff --git a/eq-author-api/schema/tests/publishSchema.test.js b/eq-author-api/schema/tests/publishSchema.test.js index b76e3d7a2c..bca4d74219 100644 --- a/eq-author-api/schema/tests/publishSchema.test.js +++ b/eq-author-api/schema/tests/publishSchema.test.js @@ -15,7 +15,7 @@ fetch.mockImplementation(() => Promise.resolve({ status: 200, json: () => ({ - id: "cir-id-1", + guid: "cir-id-1", // eslint-disable-next-line camelcase ci_version: "1", }), From 0adb8b68e8612a33f5532f23ba5f18bdaeb79a53 Mon Sep 17 00:00:00 2001 From: martyncolmer Date: Wed, 31 Jul 2024 14:48:43 +0100 Subject: [PATCH 2/2] remove console log --- eq-author-api/schema/resolvers/base.js | 1 - 1 file changed, 1 deletion(-) diff --git a/eq-author-api/schema/resolvers/base.js b/eq-author-api/schema/resolvers/base.js index deb8e25fea..e694571a53 100644 --- a/eq-author-api/schema/resolvers/base.js +++ b/eq-author-api/schema/resolvers/base.js @@ -1636,7 +1636,6 @@ const Resolvers = { .then(async (res) => { if (res.status === 200) { const responseJson = res.data; - console.log(responseJson); publishResult.cirId = responseJson.guid; publishResult.cirVersion = responseJson.ci_version; publishResult.success = true;