Skip to content
This repository was archived by the owner on Jan 15, 2025. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion packages/luis/src/commands/luis/application/import.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,11 @@ export default class LuisApplicationImport extends Command {

const client = utils.getLUISClient(subscriptionKey, endpoint)

const options: any = {}
if (name) options.appName = name

try {
const newAppId = await client.apps.importMethod(JSON.parse(appJSON), undefined)
const newAppId = await client.apps.importMethod(JSON.parse(appJSON), options)
this.log(`App successfully imported with id ${newAppId}.`)
} catch (err) {
throw new CLIError(`Failed to import app: ${err}`)
Expand Down