MCPcopy Create free account
hub / github.com/SmartThingsCommunity/smartthings-cli / handler

Function handler

src/commands/virtualdevices/delete.ts:30–36  ·  view source on GitHub ↗
(argv: ArgumentsCamelCase<CommandArgs>)

Source from the content-addressed store, hash-verified

28 .epilog(buildEpilog({ command }))
29
30const handler = async (argv: ArgumentsCamelCase<CommandArgs>): Promise<void> => {
31 const command = await apiCommand(argv)
32
33 const id = await chooseDeviceFn({ type: DeviceIntegrationType.VIRTUAL })(command, argv.id)
34 await command.client.devices.delete(id)
35 console.log(`Device ${id} deleted.`)
36}
37
38const cmd: CommandModule<object, CommandArgs> = { command, describe, builder, handler }
39export default cmd

Callers

nothing calls this directly

Calls 2

apiCommandFunction · 0.85
chooseDeviceFnFunction · 0.85

Tested by

no test coverage detected