Closed resession closed 2 years ago
after creating a user, i try tod elete that user. but gun does not delete the user.
this is the code i tested
user.create('19testuser', 'passtest19', data => { user.auth('19testuser', 'passtest19', data => { const test = {alias: '19testuser', pub: [data.pub](http://data.pub/)} user.leave() user.delete('19testuser', 'passtest19', data => { console.log('deleted', data) gun.get('~@' + test.alias).once(data => { console.log('alias', data) gun.get('~' + [test.pub](http://test.pub/)).once(data => { console.log('pub', data) }) }) }) }) })
this is what is logged
deleted { ok: 0 } alias { _: { '#': '~@19testuser', '>': { '~5EAwi8GBq--4sEju5F216bsd0WVDpBPH0Kh0blaq_2w.lhL2VFlvvUPUnJNwgDRSLKYw1RwIN968ET9y3rLygfU': 1649207683500 } }, '~5EAwi8GBq--4sEju5F216bsd0WVDpBPH0Kh0blaq_2w.lhL2VFlvvUPUnJNwgDRSLKYw1RwIN968ET9y3rLygfU': { '#': '~5EAwi8GBq--4sEju5F216bsd0WVDpBPH0Kh0blaq_2w.lhL2VFlvvUPUnJNwgDRSLKYw1RwIN968ET9y3rLygfU' } } pub undefined
deleted { ok: 0 }
alias { _: { '#': '~@19testuser', '>': { '~5EAwi8GBq--4sEju5F216bsd0WVDpBPH0Kh0blaq_2w.lhL2VFlvvUPUnJNwgDRSLKYw1RwIN968ET9y3rLygfU': 1649207683500 } }, '~5EAwi8GBq--4sEju5F216bsd0WVDpBPH0Kh0blaq_2w.lhL2VFlvvUPUnJNwgDRSLKYw1RwIN968ET9y3rLygfU': { '#': '~5EAwi8GBq--4sEju5F216bsd0WVDpBPH0Kh0blaq_2w.lhL2VFlvvUPUnJNwgDRSLKYw1RwIN968ET9y3rLygfU' } }
pub undefined
so that means .get('~pub') returns undefined, but .get('~@alias') still returns the user data even though it should have been deleted
.get('~pub')
.get('~@alias')
closing
after creating a user, i try tod elete that user. but gun does not delete the user.
this is the code i tested
user.create('19testuser', 'passtest19', data => { user.auth('19testuser', 'passtest19', data => { const test = {alias: '19testuser', pub: [data.pub](http://data.pub/)} user.leave() user.delete('19testuser', 'passtest19', data => { console.log('deleted', data) gun.get('~@' + test.alias).once(data => { console.log('alias', data) gun.get('~' + [test.pub](http://test.pub/)).once(data => { console.log('pub', data) }) }) }) }) })
this is what is logged
deleted { ok: 0 }
alias { _: { '#': '~@19testuser', '>': { '~5EAwi8GBq--4sEju5F216bsd0WVDpBPH0Kh0blaq_2w.lhL2VFlvvUPUnJNwgDRSLKYw1RwIN968ET9y3rLygfU': 1649207683500 } }, '~5EAwi8GBq--4sEju5F216bsd0WVDpBPH0Kh0blaq_2w.lhL2VFlvvUPUnJNwgDRSLKYw1RwIN968ET9y3rLygfU': { '#': '~5EAwi8GBq--4sEju5F216bsd0WVDpBPH0Kh0blaq_2w.lhL2VFlvvUPUnJNwgDRSLKYw1RwIN968ET9y3rLygfU' } }
pub undefined
so that means
.get('~pub')
returns undefined, but.get('~@alias')
still returns the user data even though it should have been deleted