Я пытаюсь обновить существующее значение в базе данных реального времени и получаю сообщение об ошибке отказа в доступе
Вот мой код:
async function handleEventCancelation() {
const eventRef = database.ref(`evento/${eventID}`);
await eventRef.child(eventID || '').update({
canceled: 'Y'
})
}
Вот ролевой слот:
"$eventoId": {
".read": true,
".write": "auth!=null && data.child('authorId').val() == auth.id"
Есть идеи по этому поводу?
Неважно, это «события» вместо «событий», вот так:
async function handleEventCancelation() {
const eventRef = database.ref(`eventos/${eventID}`);
await eventRef.child(eventID || '').update({
canceled: 'Y'
})
}