post
This commit is contained in:
@@ -113,22 +113,28 @@
|
||||
</form>
|
||||
|
||||
<script>
|
||||
const params = new URLSearchParams(window.location.search);
|
||||
const uuid = params.get("uuid");
|
||||
document.getElementById("uuidDisplay").textContent = uuid ? uuid.toLowerCase() : "-";
|
||||
const params = new URLSearchParams(window.location.search);
|
||||
const uuid = params.get("uuid");
|
||||
document.getElementById("uuidDisplay").textContent = uuid ? uuid.toLowerCase() : "-";
|
||||
|
||||
const webhookUrl = "https://002-001-5dd6e535-4d1c-46bc-9bd9-42ad4bc5f082.odoo4projects.com/webhook/0c8536be-d175-4740-8e78-123159193b23";
|
||||
const webhookPost = webhookUrl + "/submit-data";
|
||||
|
||||
const webhookBase = `https://002-001-5dd6e535-4d1c-46bc-9bd9-42ad4bc5f082.odoo4projects.com/webhook/0c8536be-d175-4740-8e78-123159193b23?uuid=${uuid}`;
|
||||
const webhookPost = `${webhookBase}/submit-data`;
|
||||
async function loadData() {
|
||||
if (!uuid) {
|
||||
alert("Missing uuid parameter in URL");
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
const res = await fetch(webhookUrl, {
|
||||
method: "POST",
|
||||
headers: {
|
||||
"Content-Type": "application/json"
|
||||
},
|
||||
body: JSON.stringify({ uuid }) // send uuid in request body
|
||||
});
|
||||
|
||||
async function loadData() {
|
||||
if (!uuid) {
|
||||
alert("Missing uuid parameter in URL");
|
||||
return;
|
||||
}
|
||||
try {
|
||||
console.log(webhookBase)
|
||||
const res = await fetch(webhookBase); // Fetching the webhook JSON
|
||||
if (!res.ok) throw new Error("Failed to fetch data");
|
||||
const data = await res.json();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user