Fix admin rename payload and harden RustDesk ID sync

This commit is contained in:
Esdras Renan 2025-11-26 21:00:08 -03:00
parent bd1bd4bef1
commit f7ad7f6a17
4 changed files with 146 additions and 6 deletions

View file

@ -49,10 +49,10 @@ export async function POST(request: Request) {
// Chamada por string reference (evita depender do tipo gerado imediatamente)
const client = convex as unknown as { mutation: (name: string, args: unknown) => Promise<unknown> }
// Nota: a mutation `machines:rename` não aceita tenantId; apenas machineId, actorId e hostname.
await client.mutation("machines:rename", {
machineId: parsed.data.machineId,
actorId,
tenantId,
hostname: parsed.data.hostname,
})
@ -62,4 +62,3 @@ export async function POST(request: Request) {
return NextResponse.json({ error: "Falha ao renomear dispositivo" }, { status: 500 })
}
}