When I try to run the code below I get an error and I'm not sure why.
confirmDelete(e) {
const db = getDatabase();
db.ref("/ships/" + e.target.id).remove();
},
If I log the e.target.id
I get the exact same as the shipKey in the code below.
Here's an example of what that database looks like:
{
"ships": {
"-N43Q4E2ruMpyfaIHGDK": {
"date": "2022-08-06T18:00",
"name": "ORANGE OCEAN",
"shipKey": "-N43Q4E2ruMpyfaIHGDK"
}
}
}