2026-08-25 07:51:38 +02:00
|
|
|
import { NextResponse } from "next/server";
|
|
|
|
|
import { listDevices } from "@/lib/db/queries/devices";
|
2026-08-26 08:45:15 +02:00
|
|
|
import { withRouteLogging } from "@/lib/api/with-route-logging";
|
2026-08-25 07:51:38 +02:00
|
|
|
|
2026-08-26 08:45:15 +02:00
|
|
|
export const GET = withRouteLogging("devices.list", async () => {
|
2026-08-25 07:51:38 +02:00
|
|
|
const rows = await listDevices();
|
|
|
|
|
return NextResponse.json({ devices: rows });
|
2026-08-26 08:45:15 +02:00
|
|
|
});
|