code update recorded at: 03/04/25 10:48:03
This commit is contained in:
parent
3f07f678ee
commit
c61f41be0c
21
handler.js
21
handler.js
|
|
@ -53,14 +53,26 @@ export const handler = async (req, res) => {
|
||||||
// BOILER_CODE_END
|
// BOILER_CODE_END
|
||||||
|
|
||||||
function modifyObj(obj) {
|
function modifyObj(obj) {
|
||||||
// Enter your code here
|
|
||||||
delete obj.properties.dynamic_yield;
|
// Check if 'properties.index' exists
|
||||||
|
if (obj.properties?.index) {
|
||||||
|
// Add a new key to indicate transformation
|
||||||
|
obj.properties.transformationStatus = "success";
|
||||||
|
}
|
||||||
|
//else {
|
||||||
|
// throw new Error("'properties.index' is required but missing...");
|
||||||
|
// }
|
||||||
|
|
||||||
|
return obj;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Exceptions available:
|
Exceptions available:
|
||||||
throw new EventNotSupportedException('your message here');
|
throw new EventNotSupportedException('your message here');
|
||||||
throw new InvalidEventPayloadException('your message here');
|
throw new InvalidEventobjException('your message here');
|
||||||
throw new RetryErrorException('your message here');
|
throw new RetryErrorException('your message here');
|
||||||
|
|
||||||
Method for generating 256 hash code for a String:
|
Method for generating 256 hash code for a String:
|
||||||
|
|
@ -68,3 +80,6 @@ Method for generating 256 hash code for a String:
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user