Fix check for at least one process input and output
This commit is contained in:
parent
0cd8be130c
commit
c44fb30a84
1 changed files with 1 additions and 1 deletions
|
|
@ -51,7 +51,7 @@ func (h *RestreamHandler) Add(c echo.Context) error {
|
||||||
return api.Err(http.StatusBadRequest, "Unsupported process type", "Supported process types are: ffmpeg")
|
return api.Err(http.StatusBadRequest, "Unsupported process type", "Supported process types are: ffmpeg")
|
||||||
}
|
}
|
||||||
|
|
||||||
if len(process.Input) == 0 && len(process.Output) == 0 {
|
if len(process.Input) == 0 || len(process.Output) == 0 {
|
||||||
return api.Err(http.StatusBadRequest, "At least one input and one output need to be defined")
|
return api.Err(http.StatusBadRequest, "At least one input and one output need to be defined")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue