I try to integrate Payload with webstudio through the REST-API this worked fine, but now i want to add the Live Preview Feature in Payload therefore I need to change the request url and add draft=true when my website get visited with mywebsite.com/blog/abc?draft=true at the moment I trid it like this:
"
https://website.com/api/blog?where[slug][equals]=" + system.params.slug + "&depth=1" + (system.params.draft === true ? "&draft=true" : "")
Is there a way to use these params or what am i doing wrong?