feat: adding teams in PG
This commit is contained in:
15
app/api/teams/directions/route.ts
Normal file
15
app/api/teams/directions/route.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
import { NextResponse } from "next/server";
|
||||
import { TeamsService } from "@/services";
|
||||
|
||||
export async function GET() {
|
||||
try {
|
||||
const directions = await TeamsService.getDirections();
|
||||
return NextResponse.json(directions);
|
||||
} catch (error) {
|
||||
console.error("Error loading directions:", error);
|
||||
return NextResponse.json(
|
||||
{ error: "Failed to load directions" },
|
||||
{ status: 500 }
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user