I am trying to get the remaining tickets available for each Plans an User bought.
So if one user bought one Plan of 10 tickets, and different plan of 5 tickets, the person could see the available remaining tickets for each plan in a table.
The query on my page is the following, get rejected, even when super simple
The reason that your query is being rejected is because the Events/Tickets collection does not have a user_id field. Refer to the article Corvid: Wix Events “Tickets” Collection Fields for full details regarding this collection.
For programming information, refer to the wix-events and wix-events-backend APIs.
Also, refer to the information on the Wix Events app.
BTW - even if the query was valid, your fetchUserTickets() function does not return any value. See Returning in a .then( ) .
Sorry for the late reply, I didnt get notified… Thank you for your answer, it’s vey clear !