I'm trying to update an existing value in Realtime Data Base and I'm getting permission denied error
Here is my code:
async function handleEventCancelation() {
const eventRef = database.ref(`evento/${eventID}`);
await eventRef.child(eventID || '').update({
canceled: 'Y'
})
}
Here is the role slot:
"$eventoId": {
".read": true,
".write": "auth!=null && data.child('authorId').val() == auth.id"
Any ideas on it?
Never mind, it is 'eventos' instead of 'evento', like this:
async function handleEventCancelation() {
const eventRef = database.ref(`eventos/${eventID}`);
await eventRef.child(eventID || '').update({
canceled: 'Y'
})
}