Simplify code for deleting a channel

This commit is contained in:
Peter Stuifzand 2018-06-30 15:45:35 +02:00
parent c1fe5075a5
commit 59a784f326

View File

@ -187,13 +187,8 @@ func (b *memoryBackend) ChannelsUpdate(uid, name string) microsub.Channel {
func (b *memoryBackend) ChannelsDelete(uid string) {
defer b.save()
if _, e := b.Channels[uid]; e {
delete(b.Channels, uid)
}
if _, e := b.Feeds[uid]; e {
delete(b.Feeds, uid)
}
delete(b.Channels, uid)
delete(b.Feeds, uid)
}
func mapToAuthor(result map[string]string) *microsub.Card {