Question:
why do not get acces to a backend file, in my case “UpdateWorkout.web.js”?
Product:
i use wix editor premium acces
What are you trying to achieve:
I try to import data from make.com http module to my cms but i cant get acces to backend file.
What have you already tried:
i tryed to create jsw file, web.js file but no acces
Additional information:
this is my code in my web.js file:
import wixData from 'wix-data';
// POST https://DEINE-DOMAIN/_functions/updateWorkout
export async function post_updateWorkout(request) {
const options = { headers: { "Content-Type": "application/json" } };
try {
const { itemId, updates } = await request.body.json();
const updatedItem = await wixData.update("WorkoutDaten", { _id: itemId, ...updates });
return new Response(JSON.stringify({ success: true, item: updatedItem }), options);
} catch (error) {
console.error("updateWorkout Fehler:", error);
return new Response(JSON.stringify({ success: false, error: error.message }), options);
}
}
i hope someone can help me out. i would also pay for your time and help. best regards Bernhard