fix: fix bug with odoo

This commit is contained in:
jinhojang6 2024-03-08 00:42:30 +09:00
parent dc744cea8e
commit 8c560d6e13
No known key found for this signature in database
GPG Key ID: 1762F21FE8B543F8
3 changed files with 3 additions and 7 deletions

View File

@ -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",
}, },

View File

@ -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);

View File

@ -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>`;