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

Function handler

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

Source from the content-addressed store, hash-verified

34
35
36const handler = async (argv: ArgumentsCamelCase<CommandArgs>): Promise<void> => {
37 const command = await apiOrganizationCommand(argv)
38
39 const id = await chooseChannel(command, argv.id, { promptMessage: 'Choose a channel to delete.' })
40 await command.client.channels.delete(id)
41 await resetManagedConfigKey(command.cliConfig, 'defaultChannel', value => value === id)
42 console.log(`Channel ${id} deleted.`)
43}
44
45const cmd: CommandModule<object, CommandArgs> = { command, describe, builder, handler }
46export default cmd

Callers

nothing calls this directly

Calls 2

apiOrganizationCommandFunction · 0.85
resetManagedConfigKeyFunction · 0.85

Tested by

no test coverage detected