Hello, I want a more complex dynamic timeslot for my multple locations services. (if there is already a booked in the afternoon on location A block all afternoon slots in location B) I made a custom booking frontend and a working back end. It all works when I run it in test but when I publish it I receive a back end error log:
GetBookingsForDay: message: ‘Unauthorized Operation: Access is denied. You may not have the appropriate permissions’ details: applicationError: description: Access is denied. You may not have the appropriate permissions code: ‘1’ data: {}"The fuction has anyone premision but I think my Bookingsv1 API also needs premisions?
The code itself:
import { bookings as bookingsQry } from 'wix-bookings-backend';
export async function getBookingsForDay(startISO, endISO) {
console.log('\[DBG\] queryBookings range', startISO, '→', endISO);
try {
const { items } = await bookingsQry
.queryBookings()
.ge('startTime', new Date(startISO))
.lt('startTime', new Date(endISO))
.limit(100)
.find();
Any idea’s on what I should do?