| 1382 | } |
| 1383 | |
| 1384 | static struct command_result *json_askrene_remove_layer(struct command *cmd, |
| 1385 | const char *buffer, |
| 1386 | const jsmntok_t *params) |
| 1387 | { |
| 1388 | struct layer *layer; |
| 1389 | struct json_stream *response; |
| 1390 | |
| 1391 | if (!param(cmd, buffer, params, |
| 1392 | p_req("layer", param_known_layer, &layer), |
| 1393 | NULL)) |
| 1394 | return command_param_failed(); |
| 1395 | plugin_log(cmd->plugin, LOG_TRACE, "%s called: %.*s", __func__, |
| 1396 | json_tok_full_len(params), json_tok_full(buffer, params)); |
| 1397 | |
| 1398 | remove_layer(layer); |
| 1399 | |
| 1400 | response = jsonrpc_stream_success(cmd); |
| 1401 | return command_finished(cmd, response); |
| 1402 | } |
| 1403 | |
| 1404 | static struct command_result *json_askrene_listlayers(struct command *cmd, |
| 1405 | const char *buffer, |
nothing calls this directly
no test coverage detected