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

Function handler

src/commands/edge/channels/enroll.ts:35–44  ·  view source on GitHub ↗
(argv: ArgumentsCamelCase<CommandArgs>)

Source from the content-addressed store, hash-verified

33
34
35const handler = async (argv: ArgumentsCamelCase<CommandArgs>): Promise<void> => {
36 const command = await apiCommand(argv)
37
38 const channelId = await chooseChannelFn({ includeReadOnly: true })( command, argv.channel )
39 const hubId = await chooseHub(command, argv.hubId, { useConfigDefault: true })
40
41 await command.client.channels.enrollHub(channelId, hubId)
42
43 console.log(`${hubId} enrolled in channel ${channelId}`)
44}
45
46const cmd: CommandModule<object, CommandArgs> = { command, describe, builder, handler }
47export default cmd

Callers

nothing calls this directly

Calls 2

apiCommandFunction · 0.85
chooseChannelFnFunction · 0.85

Tested by

no test coverage detected