I would like to delete users authenticated by yours KEY, knowing that I am a administrator, firts I created an authservice and after an userService to associate with registered user
Now in Database I have the associate user

Now in my code I have Firts, I created method auth to create user in auth.service.ts
createUser(user: any, path: string) {
return this.afu.auth.createUserWithEmailAndPassword(user.email, user.password)
.then(() => {
return this.service.save(user, path);
})
.catch((e) => console.log(e));
}
this method create user authenticated and create in Database a user, calling the method save
save(user: any, path: string) {
const createdAt = new Date();
return new Promise((resolve, reject) => {
this.db.list(this.PATH + path)
// .push(user)
// console.log(createdAt)
.push({ name: user.name, email: user.email, role: user.role_id, status: user.status, created_at: createdAt })
.then(() => resolve())
})
}
So, I have to delete this two registers by KEY in my method
remove(key: string, path: string) {
return this.db.list(this.PATH + path).remove(key);
}
Remebering, I'm administrator

remove()function? You call it onlist()?