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

Function handler

src/commands/locations/rooms/update.ts:45–55  ·  view source on GitHub ↗
(argv: ArgumentsCamelCase<CommandArgs>)

Source from the content-addressed store, hash-verified

43 .epilog(buildEpilog({ command, apiDocs: 'updateRoom' }))
44
45const handler = async (argv: ArgumentsCamelCase<CommandArgs>): Promise<void> => {
46 const command = await apiCommand(argv)
47
48 const [roomId, locationId] = await chooseRoom(command, argv.id, { locationId: argv.location })
49 const config: CommonOutputProducer<Room> = { tableFieldDefinitions }
50 await inputAndOutputItem<RoomRequest, Room>(
51 command,
52 config,
53 (_, data) => command.client.rooms.update(roomId, data, locationId),
54 )
55}
56
57const cmd: CommandModule<object, CommandArgs> = { command, describe, builder, handler }
58export default cmd

Callers

nothing calls this directly

Calls 2

apiCommandFunction · 0.85
chooseRoomFunction · 0.85

Tested by

no test coverage detected