From 457163d466eff1c8c4f136ea583608b32a28c1d0 Mon Sep 17 00:00:00 2001 From: Mishalabdullah Date: Sun, 5 May 2024 14:18:14 +0530 Subject: [PATCH] updated unique key value --- onix-gui/GUI/app/api/install-bap/route.js | 10 ++++++---- onix-gui/GUI/app/api/install-bpp/route.js | 13 +++++-------- onix-gui/GUI/next.config.mjs | 4 ++++ 3 files changed, 15 insertions(+), 12 deletions(-) create mode 100644 onix-gui/GUI/next.config.mjs diff --git a/onix-gui/GUI/app/api/install-bap/route.js b/onix-gui/GUI/app/api/install-bap/route.js index 2c5fb04..3bad4fb 100644 --- a/onix-gui/GUI/app/api/install-bap/route.js +++ b/onix-gui/GUI/app/api/install-bap/route.js @@ -91,12 +91,14 @@ export async function POST(req) { const data = await req.json(); const registryUrl = data.registryUrl; - const bppSubscriberId = data.subscriberId; - const bppSubscriberUrl = data.subscriberUrl; + const bapSubscriberId = data.subscriberId; + const bapSubscriberUrl = data.subscriberUrl; const networkconfigurl = data.networkconfigurl; + // generating unqiuekey for bap subscriberId + const uniqueKeyId = bapSubscriberId + "-key"; - let updateBppConfigCommand = `bash ${pathDir}/install/scripts/update_bap_config.sh ${registryUrl} ${bppSubscriberId} ${bppSubscriberUrl} ${networkconfigurl}`; - const result1 = await executeCommand(updateBppConfigCommand); + let updateBapConfigCommand = `bash ${pathDir}/install/scripts/update_bap_config.sh ${registryUrl} ${bapSubscriberId} ${uniqueKeyId} ${bapSubscriberUrl} ${networkconfigurl}`; + const result1 = await executeCommand(updateBapConfigCommand); console.log("Result 1:", result1); const result3 = await executeCommand( `docker-compose -f ${pathDir}/install/docker-compose-v2.yml up -d "bap-client"` diff --git a/onix-gui/GUI/app/api/install-bpp/route.js b/onix-gui/GUI/app/api/install-bpp/route.js index 2ac5ca0..49c2e80 100644 --- a/onix-gui/GUI/app/api/install-bpp/route.js +++ b/onix-gui/GUI/app/api/install-bpp/route.js @@ -89,18 +89,15 @@ export async function POST(req, res) { try { await startSupportServices(); - const data = req.json(); + const data = await req.json(); const registryUrl = data.registryUrl; const bppSubscriberId = data.subscriberId; const bppSubscriberUrl = data.subscriberUrl; const webhookUrl = data.webhookUrl; - // const webhookUrl = "https://unified-bpp.becknprotocol.io/beckn-bpp-adapter"; - - // let updateBppConfigCommand = "bash scripts/update_bpp_config.sh"; - // if (registryUrl) { - // updateBppConfigCommand += ``; - // } - let updateBppConfigCommand = `bash ${pathDir}/install/scripts/update_bpp_config.sh ${registryUrl} ${bppSubscriberId} ${bppSubscriberUrl} ${webhookUrl}`; + // generating unqiuekey for bpp subscriberId + const uniqueKeyId = bppSubscriberId + "-key"; + let updateBppConfigCommand = `bash ${pathDir}/install/scripts/update_bpp_config.sh ${registryUrl} ${bppSubscriberId} ${uniqueKeyId} ${bppSubscriberUrl} ${webhookUrl}`; + console.log("Update BPP Config Command:", updateBppConfigCommand); const result1 = await executeCommand(updateBppConfigCommand); console.log("Result 1:", result1); diff --git a/onix-gui/GUI/next.config.mjs b/onix-gui/GUI/next.config.mjs new file mode 100644 index 0000000..4678774 --- /dev/null +++ b/onix-gui/GUI/next.config.mjs @@ -0,0 +1,4 @@ +/** @type {import('next').NextConfig} */ +const nextConfig = {}; + +export default nextConfig;