From 6189d17539032975f9accae60f15989bbf758579 Mon Sep 17 00:00:00 2001 From: Andrew Pennington Date: Mon, 19 Aug 2024 12:19:37 +0100 Subject: [PATCH] Apply fix to testing routes --- ui/app/api/hello/route.ts | 4 +--- ui/app/api/time/route.ts | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/ui/app/api/hello/route.ts b/ui/app/api/hello/route.ts index ddbe855..1f65041 100644 --- a/ui/app/api/hello/route.ts +++ b/ui/app/api/hello/route.ts @@ -1,7 +1,5 @@ import { NextResponse } from 'next/server'; -async function requestHandler(_request: Request): NextResponse { +export async function GET(_request: Request) { return NextResponse.json({ 'response': 'Hello World' }); } - -export { requestHandler as GET }; \ No newline at end of file diff --git a/ui/app/api/time/route.ts b/ui/app/api/time/route.ts index 466f862..84d0fdc 100644 --- a/ui/app/api/time/route.ts +++ b/ui/app/api/time/route.ts @@ -1,7 +1,5 @@ import { NextResponse } from 'next/server'; -async function requestHandler(_request: Request): NextResponse { +export async function GET(_request: Request) { return NextResponse.json({ 'time': Date.now() }); } - -export { requestHandler as GET };