fix: fix bug with odoo
This commit is contained in:
parent
dc744cea8e
commit
8c560d6e13
|
@ -22,8 +22,6 @@
|
||||||
const name = form.querySelector("#form-name").value;
|
const name = form.querySelector("#form-name").value;
|
||||||
const email = form.querySelector("#form-email").value;
|
const email = form.querySelector("#form-email").value;
|
||||||
|
|
||||||
console.log(name, email);
|
|
||||||
|
|
||||||
const res = await fetch(
|
const res = await fetch(
|
||||||
`https://odoo.logos.co/website_mass_mailing/subscribe2`,
|
`https://odoo.logos.co/website_mass_mailing/subscribe2`,
|
||||||
{
|
{
|
||||||
|
@ -35,8 +33,8 @@
|
||||||
jsonrpc: "2.0",
|
jsonrpc: "2.0",
|
||||||
method: "call",
|
method: "call",
|
||||||
params: {
|
params: {
|
||||||
email: email,
|
value: email,
|
||||||
name: name,
|
name: name || "",
|
||||||
list_id: 12,
|
list_id: 12,
|
||||||
subscription_type: "email",
|
subscription_type: "email",
|
||||||
},
|
},
|
||||||
|
|
|
@ -16,8 +16,6 @@
|
||||||
if ($history.length === 0) {
|
if ($history.length === 0) {
|
||||||
const command = commands["banner"] as () => string;
|
const command = commands["banner"] as () => string;
|
||||||
|
|
||||||
console.log("command", command);
|
|
||||||
|
|
||||||
if (command) {
|
if (command) {
|
||||||
const output = command();
|
const output = command();
|
||||||
console.log("output", output);
|
console.log("output", output);
|
||||||
|
|
|
@ -13,7 +13,7 @@ export const commands: Record<
|
||||||
const htmlString = `<template>
|
const htmlString = `<template>
|
||||||
<form class="apply-form" onsubmit="handleSubmit(event)">
|
<form class="apply-form" onsubmit="handleSubmit(event)">
|
||||||
<input class="apply-input" id="form-name" placeholder="First name or pseudonym" />
|
<input class="apply-input" id="form-name" placeholder="First name or pseudonym" />
|
||||||
<input class="apply-input" id="form-email" placeholder="Email address" type="email" />
|
<input class="apply-input" id="form-email" placeholder="Email address" type="email" required />
|
||||||
<button class="apply-submit">Submit</button>
|
<button class="apply-submit">Submit</button>
|
||||||
</form>
|
</form>
|
||||||
</template>`;
|
</template>`;
|
||||||
|
|
Loading…
Reference in New Issue