Return empty object with code as specified in the API when calling PUT/DELETE /api/config/...
Signed-off-by: DL6ER <dl6er@dl6er.de>
This commit is contained in:
parent
8664165ebc
commit
abf0b735a4
|
@ -925,7 +925,10 @@ static int api_config_put_delete(struct ftl_conn *api)
|
|||
// Store changed configuration to disk
|
||||
writeFTLtoml(true);
|
||||
|
||||
return api->method == HTTP_PUT ? 201 : 204; // 201 - Created or 204 - No content
|
||||
// Send empty reply with matching HTTP status code
|
||||
// 201 - Created or 204 - No content
|
||||
cJSON *json = JSON_NEW_OBJECT();
|
||||
JSON_SEND_OBJECT_CODE(json, api->method == HTTP_PUT ? 201 : 204);
|
||||
}
|
||||
|
||||
// Endpoint /api/config router
|
||||
|
|
Loading…
Reference in New Issue