fix 修复uid为空的情况
Some checks failed
Build image / build (push) Failing after 10m3s

This commit is contained in:
timerzz 2024-05-21 21:30:18 +08:00
parent a090688b49
commit d4cd0bd2d1
2 changed files with 1 additions and 5 deletions

View File

@ -49,12 +49,9 @@ type WatchInfor interface {
func (w *WatchInfo) GenUid() { func (w *WatchInfo) GenUid() {
if w.Uid == "" { if w.Uid == "" {
switch w.Website {
case CoachOutlet:
w.Uid = fmt.Sprintf("coachOutlet_%s", w.Pid) w.Uid = fmt.Sprintf("coachOutlet_%s", w.Pid)
} }
} }
}
func (w *WatchInfo) ToPusherIds() []int64 { func (w *WatchInfo) ToPusherIds() []int64 {
var ids = make([]int64, 0, len(w.Pushers)) var ids = make([]int64, 0, len(w.Pushers))

View File

@ -41,7 +41,6 @@ func (c *CoachOutlet) SetOption(cfg model.WatchInfo) {
func (c *CoachOutlet) Cancel() { func (c *CoachOutlet) Cancel() {
c.cancel() c.cancel()
c.db.Where("uid = ?", c.cfg.Uid).Model(c.cfg).Update("watch", false)
} }
func (c *CoachOutlet) Restart() { func (c *CoachOutlet) Restart() {