From 14b6924b02c16d8ef059a756300b95df19186f75 Mon Sep 17 00:00:00 2001 From: Andrew Pennington Date: Mon, 19 Aug 2024 12:14:24 +0100 Subject: [PATCH] Rework env api route --- ui/app/api/env/route.ts | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/ui/app/api/env/route.ts b/ui/app/api/env/route.ts index 50aa7e6..b60bbf6 100644 --- a/ui/app/api/env/route.ts +++ b/ui/app/api/env/route.ts @@ -1,15 +1,13 @@ import process from 'process'; import { NextResponse } from 'next/server'; -async function requestHandler(_request: Request): NextResponse { +export async function GET(_request: Request): NextResponse { // Access environment variables const envVars = { - BACKEND_API_URL: process.env.BACKEND_API_URL, - BACKEND_WS_URL: process.env.BACKEND_WS_URL + 'BACKEND_API_URL': process.env.BACKEND_API_URL, + 'BACKEND_WS_URL': process.env.BACKEND_WS_URL } // Return the environment variables as a JSON response return NextResponse.json(envVars); } - -export { requestHandler as GET }; \ No newline at end of file