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

This commit is contained in:
phunter committed 2025-12-23 00:03:11 -05:00
1 parent 7d82a9e223
commit 2f1c906853
3 files changed
+37 -8

No files matched your search

+3 -1
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",
},
});