Manager: reject removal of empty list of blocklist entries
A request to remove an empty list of blocklist entries now results in a 400 Bad Request.
This commit is contained in:
parent
3b978ceda0
commit
11e5363d24
@ -376,6 +376,9 @@ func (f *Flamenco) RemoveJobBlocklist(e echo.Context, jobID string) error {
|
||||
logger.Warn().Err(err).Msg("bad request received")
|
||||
return sendAPIError(e, http.StatusBadRequest, "invalid format")
|
||||
}
|
||||
if len(entriesToRemove) == 0 {
|
||||
return sendAPIError(e, http.StatusBadRequest, "empty list of blocklist entries given")
|
||||
}
|
||||
|
||||
var lastErr error
|
||||
for _, entry := range entriesToRemove {
|
||||
|
Loading…
x
Reference in New Issue
Block a user