Simplify code for deleting a channel
This commit is contained in:
parent
c1fe5075a5
commit
59a784f326
|
@ -187,13 +187,8 @@ func (b *memoryBackend) ChannelsUpdate(uid, name string) microsub.Channel {
|
||||||
func (b *memoryBackend) ChannelsDelete(uid string) {
|
func (b *memoryBackend) ChannelsDelete(uid string) {
|
||||||
defer b.save()
|
defer b.save()
|
||||||
|
|
||||||
if _, e := b.Channels[uid]; e {
|
|
||||||
delete(b.Channels, uid)
|
delete(b.Channels, uid)
|
||||||
}
|
|
||||||
|
|
||||||
if _, e := b.Feeds[uid]; e {
|
|
||||||
delete(b.Feeds, uid)
|
delete(b.Feeds, uid)
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func mapToAuthor(result map[string]string) *microsub.Card {
|
func mapToAuthor(result map[string]string) *microsub.Card {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user