My code is working in preview, but no working when published.

How can I do it? Where can i find databasse permissions? , and, how can I Check if a synced the preview with live? I’m new in this Velo Wix.