Fix admin rename payload and harden RustDesk ID sync
This commit is contained in:
parent
bd1bd4bef1
commit
f7ad7f6a17
4 changed files with 146 additions and 6 deletions
|
|
@ -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 })
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue