Skip to content

DeepSeek Harness Tauri 桌面版 | Only 8mb installer, zero environment setup, preset plugins, Windows / macOS / Linux.

557 B
Raw Blame
import type { EventHandlerRequest } from 'h3'
import type { RemoteActionResponse, RemoteMachineIdBody } from '../index.types'
import { defineEventHandler, readBody } from 'h3'
import { machine } from '../../../service/machine'
import { guarded, machineIdOf } from '../index.utils'

export default defineEventHandler<EventHandlerRequest, Promise<RemoteActionResponse>>(async (event) => {
  const body = (await readBody<RemoteMachineIdBody>(event)) ?? {}
  return guarded(event, async () => {
    await machine.remove(machineIdOf(body))
    return {}
  })
})