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

Function handler

src/commands/locations/rooms/create.ts:47–57  ·  view source on GitHub ↗
(argv: ArgumentsCamelCase<CommandArgs>)

Source from the content-addressed store, hash-verified

45 .epilog(buildEpilog({ command, apiDocs: 'createRoom' }))
46
47const handler = async (argv: ArgumentsCamelCase<CommandArgs>): Promise<void> => {
48 const command = await apiCommand(argv)
49
50 const locationId = await chooseLocation(command, argv.location)
51 const config: InputAndOutputItemConfig<Room> = { tableFieldDefinitions }
52 await inputAndOutputItem<RoomRequest, Room>(
53 command,
54 config,
55 (_, room) => command.client.rooms.create(room, locationId),
56 )
57}
58
59const cmd: CommandModule<object, CommandArgs> = { command, describe, builder, handler }
60export default cmd

Callers

nothing calls this directly

Calls 1

apiCommandFunction · 0.85

Tested by

no test coverage detected