Hi there, I have a problem with my store product update code from a url It works with the console, but not from the url
export function get_maj ( request ) {
var productId=request.query [ “id” ];
var v = request.query [ “v” ];
wixStoresBackend . updateProductFields ( productId , {
“name” : “new name”
})
. then (( product ) => {
// Product has been updated
return ok ();
console . log ( “maj ok” );
})
. catch (( error ) => {
// There was an error updating the product
console . log ( error );
return ok ();
});
console . log ( “fin” );
return ok ();
}