Skip to content

Commit

Permalink
Add white space
Browse files Browse the repository at this point in the history
  • Loading branch information
timuric committed Aug 21, 2024
1 parent 50800ad commit 7188dfb
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions src/app/api/demo-payment/route.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
const removeWhiteSpace = (str: string): string => {
return str.replaceAll(/[\t\n]/g, "");
};

const url = `https://${process.env.VERCEL_BRANCH_URL}`;

export async function GET() {
Expand Down Expand Up @@ -32,7 +28,7 @@ export async function GET() {
{
name: "Transaction initialize",
asyncEvents: ["TRANSACTION_INITIALIZE_SESSION"],
query: removeWhiteSpace(`
query: `
subscription {
event {
... on TransactionInitializeSession {
Expand All @@ -48,14 +44,14 @@ export async function GET() {
idempotencyKey
}
}
}`),
}`,
targetUrl: `${url}/api/demo-payment/transaction-initialize`,
isActive: true,
},
{
name: "Gateway initialize",
asyncEvents: ["PAYMENT_GATEWAY_INITIALIZE_SESSION"],
query: removeWhiteSpace(`
query: `
subscription {
event {
... on PaymentGatewayInitializeSession {
Expand All @@ -64,7 +60,7 @@ export async function GET() {
data
}
}
}`),
}`,
targetUrl: `${url}/api/demo-payment/gateway-initialize`,
isActive: true,
},
Expand Down

0 comments on commit 7188dfb

Please sign in to comment.