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

Function handler

src/commands/installedapps/rename.ts:55–64  ·  view source on GitHub ↗
(argv: ArgumentsCamelCase<CommandArgs>)

Source from the content-addressed store, hash-verified

53 .epilog(buildEpilog({ command }))
54
55const handler = async (argv: ArgumentsCamelCase<CommandArgs>): Promise<void> => {
56 const command = await apiCommand(argv)
57
58 const listOptions: InstalledAppListOptions = { locationId: argv.location }
59 const installedAppId = await chooseInstalledAppFn({ verbose: argv.verbose, listOptions })(command, argv.id)
60
61 const displayName = argv.newName ?? await stringInput('Enter new installed app name:')
62 const updatedApp = await command.client.installedApps.update(installedAppId, { displayName })
63 await formatAndWriteItem(command, { tableFieldDefinitions }, updatedApp)
64}
65
66const cmd: CommandModule<object, CommandArgs> = { command, describe, builder, handler }
67export default cmd

Callers

nothing calls this directly

Calls 4

apiCommandFunction · 0.85
chooseInstalledAppFnFunction · 0.85
stringInputFunction · 0.85
formatAndWriteItemFunction · 0.85

Tested by

no test coverage detected