You can do something like:
export async function checkIfProductDownloadable(orderId) {
if(!orderId){
return 403
} else {
return wixData.query("Stores/Orders")
///...etc..
}
//etc..
You can do something like:
export async function checkIfProductDownloadable(orderId) {
if(!orderId){
return 403
} else {
return wixData.query("Stores/Orders")
///...etc..
}
//etc..