Fix contact form action processing for "reset" being nested incorrectly
This commit is contained in:
parent
e010ac2fd7
commit
6e7977997e
1 changed files with 8 additions and 8 deletions
|
|
@ -167,20 +167,20 @@ const submitActionDefinition = {
|
||||||
return {
|
return {
|
||||||
nextAction: "complete",
|
nextAction: "complete",
|
||||||
};
|
};
|
||||||
} else if (input.action === "reset") {
|
|
||||||
context.session?.delete("phone");
|
|
||||||
context.session?.delete("name");
|
|
||||||
context.session?.delete("msg");
|
|
||||||
|
|
||||||
return {
|
|
||||||
nextAction: "send_otp",
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
throw new ActionError({
|
throw new ActionError({
|
||||||
code: "SERVICE_UNAVAILABLE",
|
code: "SERVICE_UNAVAILABLE",
|
||||||
message: "Message failed to send.",
|
message: "Message failed to send.",
|
||||||
});
|
});
|
||||||
|
} else if (input.action === "reset") {
|
||||||
|
context.session?.delete("phone");
|
||||||
|
context.session?.delete("name");
|
||||||
|
context.session?.delete("msg");
|
||||||
|
|
||||||
|
return {
|
||||||
|
nextAction: "send_otp",
|
||||||
|
};
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue