add remove buses when empty
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
package models
|
||||
|
||||
import "slices"
|
||||
import (
|
||||
"slices"
|
||||
)
|
||||
|
||||
// topic model
|
||||
type Topic struct {
|
||||
@@ -33,6 +35,7 @@ func (t *Topic) RemoveSubscription(subs ...string) {
|
||||
t.Subscribe = []string{}
|
||||
return
|
||||
}
|
||||
|
||||
for _, toDelete := range subs {
|
||||
for i, a := range t.Subscribe {
|
||||
if a == toDelete {
|
||||
|
Reference in New Issue
Block a user