From 4f5e7569da7cbf9751bb0dfc8b1c79ce98c9199e Mon Sep 17 00:00:00 2001 From: Chris Risner Date: Wed, 4 Oct 2023 14:26:31 -0500 Subject: [PATCH] feat(dev): create dev branch to use dev api endpoint and deploy at credit.dev.driv.ly --- package.json | 2 +- src/app/api/credit-app/route.ts | 2 +- src/app/utils/getPayoffQuote.ts | 2 +- src/hooks/usePayoffLenders.tsx | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 6038461..48ac1aa 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "credit-app", + "name": "credit-app.dev", "version": "0.1.0", "private": true, "scripts": { diff --git a/src/app/api/credit-app/route.ts b/src/app/api/credit-app/route.ts index 5e73c63..e683cbc 100644 --- a/src/app/api/credit-app/route.ts +++ b/src/app/api/credit-app/route.ts @@ -28,7 +28,7 @@ export const POST = withAppRouterHighlight(async(request: Request) => { console.log('payload', payload) try { await slackMsgRequest({ url: slackUrl, data }) - const d = await fetch('https://credit.api.driv.ly/applications', { + const d = await fetch('https://credit.api.dev.driv.ly/applications', { method: 'POST', body: JSON.stringify({ ...payload }), headers: { 'Content-Type': 'application/json' }, diff --git a/src/app/utils/getPayoffQuote.ts b/src/app/utils/getPayoffQuote.ts index f4b476d..1262e13 100644 --- a/src/app/utils/getPayoffQuote.ts +++ b/src/app/utils/getPayoffQuote.ts @@ -22,7 +22,7 @@ type PayoffQuoteResponse = { } export async function getPayoffQuote(request: PayoffQuoteRequest) { - const res = await fetch(`https://credit.api.driv.ly/payoff`, { + const res = await fetch(`https://credit.api.dev.driv.ly/payoff`, { method: 'POST', body: JSON.stringify(request), headers: { 'Content-Type': 'application/json' }, diff --git a/src/hooks/usePayoffLenders.tsx b/src/hooks/usePayoffLenders.tsx index d42546e..28c39a5 100644 --- a/src/hooks/usePayoffLenders.tsx +++ b/src/hooks/usePayoffLenders.tsx @@ -28,7 +28,7 @@ const usePayoffLenders = () => { useEffect(() => { const getPayoffLenders = async () => { - const { data } = await fetch('https://credit.api.driv.ly/fields').then((res) => res.json()) + const { data } = await fetch('https://credit.api.dev.driv.ly/fields').then((res) => res.json()) const lenders = await data?.ancillaryServices?.[0].financeSourceList const sortedLenders = sortByFsName(lenders) setLenders(sortedLenders)