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

Function handler

src/commands/edge/channels/update.ts:46–59  ·  view source on GitHub ↗
(argv: ArgumentsCamelCase<CommandArgs>)

Source from the content-addressed store, hash-verified

44 .epilog(buildEpilog({ command, apiDocs: 'updateChannel' }))
45
46const handler = async (argv: ArgumentsCamelCase<CommandArgs>): Promise<void> => {
47 const command = await apiOrganizationCommand(argv)
48
49 const id = await chooseChannel(
50 command,
51 argv.id,
52 { promptMessage: 'Choose a channel to update.', useConfigDefault: true },
53 )
54 await inputAndOutputItem<ChannelUpdate, Channel>(
55 command,
56 { tableFieldDefinitions },
57 (_, channelMods) => command.client.channels.update(id, channelMods),
58 )
59}
60
61const cmd: CommandModule<object, CommandArgs> = { command, describe, builder, handler }
62export default cmd

Callers

nothing calls this directly

Calls 1

apiOrganizationCommandFunction · 0.85

Tested by

no test coverage detected