mirror of
https://github.com/livekit/livekit.git
synced 2026-10-23 04:22:30 +00:00
Reject ingress if Enabled flag is false (#3293)
This commit is contained in:
1 parent
7f6bd614a0
commit
25fa83926f
1 file changed
+5
@@ -159,6 +159,7 @@ func (s *IngressService) CreateIngressWithUrl(ctx context.Context, urlStr string
|
||||
ParticipantName: req.ParticipantName,
|
||||
ParticipantMetadata: req.ParticipantMetadata,
|
||||
State: &livekit.IngressState{},
|
||||
Enabled: req.Enabled,
|
||||
}
|
||||
|
||||
switch req.InputType {
|
||||
@@ -261,6 +262,10 @@ func updateInfoUsingRequest(req *livekit.UpdateIngressRequest, info *livekit.Ing
|
||||
info.Video = req.Video
|
||||
}
|
||||
|
||||
if req.Enabled != nil {
|
||||
info.Enabled = req.Enabled
|
||||
}
|
||||
|
||||
if err := ingress.ValidateForSerialization(info); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user