16 lines
413 B
TypeScript
16 lines
413 B
TypeScript
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 }
|
|
);
|
|
}
|
|
}
|