Estoy tratando de actualizar un valor existente en Realtime Data Base y obtengo un error de permiso denegado
Aquí está mi código:
async function handleEventCancelation() { const eventRef = database.ref(`evento/${eventID}`); await eventRef.child(eventID || '').update({ canceled: 'Y' }) }Aquí está la ranura de rol:
"$eventoId": { ".read": true, ".write": "auth!=null && data.child('authorId').val() == auth.id"¿Alguna idea al respecto?
No importa, es 'eventos' en lugar de 'evento', así:
async function handleEventCancelation() { const eventRef = database.ref(`eventos/${eventID}`); await eventRef.child(eventID || '').update({ canceled: 'Y' }) }