#915 Validate POST /stop REST API parameters

This patch ensures that all required parameters are sent in the request.
master
Roberto Hueso Gómez 2019-11-05 11:06:05 +01:00 committed by OpenGnSys Support Team
parent 0a41d5d02f
commit bc1b958ceb
1 changed files with 3 additions and 0 deletions

View File

@ -3928,6 +3928,9 @@ static int og_cmd_stop(json_t *element, struct og_msg_params *params)
break;
}
if (!og_msg_params_validate(params, OG_REST_PARAM_ADDR))
return -1;
return og_cmd_legacy_send(params, "Purgar", CLIENTE_APAGADO);
}