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

Function handler

src/commands/locations/modes/create.ts:43–53  ·  view source on GitHub ↗
(argv: ArgumentsCamelCase<CommandArgs>)

Source from the content-addressed store, hash-verified

41 .epilog(buildEpilog({ command, apiDocs: 'createMode' }))
42
43const handler = async (argv: ArgumentsCamelCase<CommandArgs>): Promise<void> => {
44 const command = await apiCommand(argv)
45
46 const locationId = await chooseLocation(command, argv.location)
47 const config: CommonOutputProducer<Mode> = { tableFieldDefinitions }
48 await inputAndOutputItem<ModeRequest, Mode>(
49 command,
50 config,
51 (_, mode) => command.client.modes.create(mode, locationId),
52 )
53}
54
55const cmd: CommandModule<object, CommandArgs> = { command, describe, builder, handler }
56export default cmd

Callers

nothing calls this directly

Calls 1

apiCommandFunction · 0.85

Tested by

no test coverage detected