feat: Enhance device registration to include name and active slot, supporting remote configuration updates and shutdown.

This commit is contained in:
2025-12-23 00:03:11 -05:00
parent 7d82a9e223
commit 2f1c906853
3 changed files with 37 additions and 8 deletions

View File

@@ -3,7 +3,7 @@ import { prisma } from "@/lib/prisma";
export async function POST(req: Request) {
try {
const { serialNumber, macAddress } = await req.json();
const { serialNumber, macAddress, activeSlot, name } = await req.json();
if (!serialNumber || !macAddress) {
return NextResponse.json(
@@ -28,6 +28,8 @@ export async function POST(req: Request) {
data: {
serialNumber,
macAddress,
activeSlot: activeSlot || "A",
name: name || "Unnamed Device",
status: "PENDING",
},
});