Hi, I’m trying to get the query variable from url in backend module.jsw and function.js files. But showing the error can’t find the module. import declaration is used accurately.
Wix Location is a frontend api
wixLocation it’s a module for navigating user browser. The jsw modules code work on the server part of the app.
Then how I can get the query details in the backend function?
Yes, sure. You can return a needed data from backend and then redirect.
import wixLocation from 'wix-location';
import { myFunction } from 'backand/myModule.jsw';
$w.onReady(() => {
myFunction().then((path) => {
wixLocation.to(path);
});
});