Fix check for at least one process input and output

This commit is contained in:
Ingo Oppermann
2023-01-02 06:57:02 +01:00
parent 0cd8be130c
commit c44fb30a84

View File

@@ -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")
}
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")
}