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

Function handler

src/commands/locations/rooms/delete.ts:38–44  ·  view source on GitHub ↗
(argv: ArgumentsCamelCase<CommandArgs>)

Source from the content-addressed store, hash-verified

36 .epilog(buildEpilog({ command, apiDocs: 'deleteRoom' }))
37
38const handler = async (argv: ArgumentsCamelCase<CommandArgs>): Promise<void> => {
39 const command = await apiCommand(argv)
40
41 const [roomId, locationId] = await chooseRoom(command, argv.id, { locationId: argv.location })
42 await command.client.rooms.delete(roomId, locationId)
43 console.log(`Room ${roomId} deleted.`)
44}
45
46const cmd: CommandModule<object, CommandArgs> = { command, describe, builder, handler }
47export default cmd

Callers

nothing calls this directly

Calls 2

apiCommandFunction · 0.85
chooseRoomFunction · 0.85

Tested by

no test coverage detected