Implement Last.FM Web authentication flow

This commit is contained in:
Deluan 2021-06-19 14:07:26 -04:00 committed by Deluan Quintão
parent 502a719e96
commit 143cde37e5
3 changed files with 89 additions and 130 deletions

View file

@ -34,6 +34,18 @@ func (p *MockedPropertyRepo) Get(id string) (string, error) {
return "", model.ErrNotFound
}
func (p *MockedPropertyRepo) Delete(id string) error {
if p.err != nil {
return p.err
}
p.init()
if _, ok := p.data[id]; ok {
delete(p.data, id)
return nil
}
return model.ErrNotFound
}
func (p *MockedPropertyRepo) DefaultGet(id string, defaultValue string) (string, error) {
if p.err != nil {
return "", p.err