Reject ingress if Enabled flag is false (#3293)
This commit is contained in:
@@ -159,6 +159,7 @@ func (s *IngressService) CreateIngressWithUrl(ctx context.Context, urlStr string
|
|||||||
ParticipantName: req.ParticipantName,
|
ParticipantName: req.ParticipantName,
|
||||||
ParticipantMetadata: req.ParticipantMetadata,
|
ParticipantMetadata: req.ParticipantMetadata,
|
||||||
State: &livekit.IngressState{},
|
State: &livekit.IngressState{},
|
||||||
|
Enabled: req.Enabled,
|
||||||
}
|
}
|
||||||
|
|
||||||
switch req.InputType {
|
switch req.InputType {
|
||||||
@@ -261,6 +262,10 @@ func updateInfoUsingRequest(req *livekit.UpdateIngressRequest, info *livekit.Ing
|
|||||||
info.Video = req.Video
|
info.Video = req.Video
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if req.Enabled != nil {
|
||||||
|
info.Enabled = req.Enabled
|
||||||
|
}
|
||||||
|
|
||||||
if err := ingress.ValidateForSerialization(info); err != nil {
|
if err := ingress.ValidateForSerialization(info); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user