updated unique key value

This commit is contained in:
Mishalabdullah
2024-05-05 14:18:14 +05:30
parent f2a17624e2
commit 457163d466
3 changed files with 15 additions and 12 deletions

View File

@@ -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"`

View File

@@ -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);

View File

@@ -0,0 +1,4 @@
/** @type {import('next').NextConfig} */
const nextConfig = {};
export default nextConfig;