From 5673c9edfa9fb6466786431a74cc141d64e7d349 Mon Sep 17 00:00:00 2001 From: Chris Risner Date: Thu, 11 Jan 2024 13:51:56 -0600 Subject: [PATCH] feat(API): adding tenant dev & prod to payload --- README.md | 2 +- src/app/api/credit-app/route.ts | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 3079747..7b4fc34 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,6 @@ Full credit application powered by Drivly ## APIs Used -- [airtable.do](https://github.com/drivly/airtable.do) +- [airtable.vin](https://github.com/drivly/airtable.vin) - [credit.api.driv.ly](https://github.com/drivly/route-one) - [build.vin](https://github.com/drivly/build.vin) diff --git a/src/app/api/credit-app/route.ts b/src/app/api/credit-app/route.ts index 5e73c63..a6df0c3 100644 --- a/src/app/api/credit-app/route.ts +++ b/src/app/api/credit-app/route.ts @@ -4,9 +4,12 @@ import { NextResponse } from 'next/server' import { withAppRouterHighlight } from '@/app/utils/withAppRouterHighlight' const slackUrl = process.env.SLACK_WEBHOOK_URL +const TENANT = process.env.NODE_ENV === 'development' ? 'CLOUD-DEV' : 'CLOUD-PROD' -export const POST = withAppRouterHighlight(async(request: Request) => { - let payload: Record = {} +export const POST = withAppRouterHighlight(async (request: Request) => { + let payload: Record = { + tenant: TENANT, + } const data = await request.json() const { primary, secondary, vehicle, tradeIn } = data