Skip to content

Commit

Permalink
move set/remove object param cases down
Browse files Browse the repository at this point in the history
  • Loading branch information
mikewuu committed Jan 23, 2024
1 parent 22529fb commit 13cdd99
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions lib/interact-for-open-api-object.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,19 @@ export const interactForOpenApiObject = async (
],
})

if (paramToEdit === undefined) {
return args.params
}

if (paramToEdit === "empty") {
return undefined
}

if (paramToEdit === "done") {
// TODO check for required
return args.params
}

if (paramToEdit === "set_property") {
const name = (
await prompts({
Expand Down Expand Up @@ -162,19 +175,6 @@ export const interactForOpenApiObject = async (
return otherParams
}

if (paramToEdit === undefined) {
return args.params
}

if (paramToEdit === "empty") {
return undefined
}

if (paramToEdit === "done") {
// TODO check for required
return args.params
}

const prop = properties[paramToEdit]

if (paramToEdit === "device_id") {
Expand Down

0 comments on commit 13cdd99

Please sign in to comment.