hello needed to setup http request based on if and else
using following code can any one help
import { axios } from "@pipedream/platform"
export default defineComponent({
async run({steps, $}) {
if (steps.trigger.event.body.info.to_pincode == '411045' ) {
return await axios($, {
method: "POST",
url: ``{{baseUrl}/message/text?`,
params: {
key: `keycode`,
},
body: {
id: '919999999999',
message: 'if'
}
})
} else {
return await axios($, {
method: 'POST',
url: `{{baseUrl}}/message/text?`,
params: {
key: `keycode`,
},
body: {
id: '919999999999',
message: 'else'
}
})
}
},
})