Updating query row API to correctly state successful if not returning an error.

This commit is contained in:
mike12345567 2024-12-13 17:33:40 +00:00
parent b58aa807bd
commit d20592e885
2 changed files with 3 additions and 3 deletions

View File

@ -152,7 +152,7 @@ export async function run({
return {
rows,
success: !!ctx.body.rows,
success: true,
}
} catch (err) {
return {

View File

@ -96,7 +96,7 @@ describe("Test a query step automation", () => {
)
.run()
expect(result.steps[0].outputs.success).toBe(false)
expect(result.steps[0].outputs.success).toBe(true)
expect(result.steps[0].outputs.rows).toBeDefined()
expect(result.steps[0].outputs.rows.length).toBe(0)
})
@ -125,7 +125,7 @@ describe("Test a query step automation", () => {
)
.run()
expect(result.steps[0].outputs.success).toBe(false)
expect(result.steps[0].outputs.success).toBe(true)
expect(result.steps[0].outputs.rows).toBeDefined()
expect(result.steps[0].outputs.rows.length).toBe(0)
})