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

Function handler

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

Source from the content-addressed store, hash-verified

43 .epilog(buildEpilog({ command, apiDocs: ['updatePreferenceById'] }))
44
45const handler = async (argv: ArgumentsCamelCase<CommandArgs>): Promise<void> => {
46 const command = await apiOrganizationCommand(argv)
47
48 const id = await chooseDevicePreference(command, argv.id)
49 await inputAndOutputItem<DevicePreference, DevicePreference>(
50 command,
51 { tableFieldDefinitions },
52 (_, devicePreference) => command.client.devicePreferences.update(id, devicePreference),
53 )
54}
55
56const cmd: CommandModule<object, CommandArgs> = { command, describe, builder, handler }
57export default cmd

Callers

nothing calls this directly

Calls 1

apiOrganizationCommandFunction · 0.85

Tested by

no test coverage detected