Skip to content

Commit f0a153c

Browse files
committed
remove secrets, bind to vercel
1 parent 9a68adb commit f0a153c

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

multichannel-app/frontend/app/api/admin/bind/route.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ export const GET = async (_req: Request) => {
1111
const phone_number = VONAGE_LVN;
1212
const application_id = VONAGE_APPLICATION_ID;
1313
const endpoint = process.env.ENDPOINT;
14-
const webhooks_host = process.env.VERCEL_URL ? `https://${process.env.VERCEL_URL}`:endpoint;
14+
const webhooks_host = process.env.NEXT_PUBLIC_VERCEL_URL ? `https://${process.env.NEXT_PUBLIC_VERCEL_URL}`:endpoint;
1515
const WEBHOOKS_URL = `${webhooks_host}/api`;
1616
const api_key = VONAGE_API_KEY;
1717
const api_secret = VONAGE_API_SECRET;
@@ -102,10 +102,8 @@ export const GET = async (_req: Request) => {
102102
return new Response(JSON.stringify({
103103
env: {
104104
VONAGE_API_KEY,
105-
VONAGE_API_SECRET,
106105
VONAGE_LVN,
107-
WEBHOOKS_URL,
108-
dev_api_token
106+
WEBHOOKS_URL
109107
},
110108
newAppRes,
111109
bindLvnRes

multichannel-app/ws-bot-backend/src/index.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,14 @@ app.get('/ping', async (req, res) => {
4242
status: 'ok'
4343
});
4444
});
45+
app.get('/post', async (req, res) => {
46+
47+
48+
return res.status(200).json({
49+
status: 'ok'
50+
});
51+
});
52+
4553

4654
app.ws('/echo', async (ws, req) => {
4755
console.log('received ws connection echo');

0 commit comments

Comments
 (0)