Fix: use correct profile URL /webhook/paraguay/profile
This commit is contained in:
+4
-4
@@ -17,7 +17,7 @@ function setCookie(name, value, days) {
|
|||||||
|
|
||||||
const API_URL = 'https://n8n.odoo4projects.com/webhook/paraguay/login';
|
const API_URL = 'https://n8n.odoo4projects.com/webhook/paraguay/login';
|
||||||
const NEWSLETTER_URL = 'https://n8n.odoo4projects.com/webhook/paraguay/newsletter';
|
const NEWSLETTER_URL = 'https://n8n.odoo4projects.com/webhook/paraguay/newsletter';
|
||||||
const USER_URL = 'https://n8n.odoo4projects.com/webhook/paraguay/user';
|
const PROFILE_URL = 'https://n8n.odoo4projects.com/webhook/paraguay/profile';
|
||||||
|
|
||||||
function checkSession() {
|
function checkSession() {
|
||||||
const sessionid = getCookie('sessionid');
|
const sessionid = getCookie('sessionid');
|
||||||
@@ -215,9 +215,9 @@ async function subscribeNewsletter() {
|
|||||||
async function loadUsers() {
|
async function loadUsers() {
|
||||||
const usersContainer = document.getElementById('users-list');
|
const usersContainer = document.getElementById('users-list');
|
||||||
if (!usersContainer) return;
|
if (!usersContainer) return;
|
||||||
console.log('loadUsers: starting fetch from', USER_URL);
|
console.log('loadUsers: starting fetch from', PROFILE_URL);
|
||||||
try {
|
try {
|
||||||
const response = await fetch(USER_URL);
|
const response = await fetch(PROFILE_URL);
|
||||||
console.log('loadUsers: response status =', response.status);
|
console.log('loadUsers: response status =', response.status);
|
||||||
if (!response.ok) throw new Error('Failed to fetch users');
|
if (!response.ok) throw new Error('Failed to fetch users');
|
||||||
const data = await response.json();
|
const data = await response.json();
|
||||||
@@ -264,7 +264,7 @@ async function openProfileModal() {
|
|||||||
const sessionid = getCookie('sessionid');
|
const sessionid = getCookie('sessionid');
|
||||||
if (!sessionid) { alert('Bitte melden Sie sich an.'); return; }
|
if (!sessionid) { alert('Bitte melden Sie sich an.'); return; }
|
||||||
try {
|
try {
|
||||||
const response = await fetch(USER_URL, {
|
const response = await fetch(PROFILE_URL, {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
headers: { 'Content-Type': 'application/json' },
|
headers: { 'Content-Type': 'application/json' },
|
||||||
body: JSON.stringify({ sessionid: sessionid })
|
body: JSON.stringify({ sessionid: sessionid })
|
||||||
|
|||||||
Reference in New Issue
Block a user