| 1451 | } |
| 1452 | |
| 1453 | static struct command_result *json_askrene_remove_layer(struct command *cmd, |
| 1454 | const char *buffer, |
| 1455 | const jsmntok_t *params) |
| 1456 | { |
| 1457 | struct layer *layer; |
| 1458 | struct json_stream *response; |
| 1459 | |
| 1460 | if (!param(cmd, buffer, params, |
| 1461 | p_req("layer", param_known_layer, &layer), |
| 1462 | NULL)) |
| 1463 | return command_param_failed(); |
| 1464 | plugin_log(cmd->plugin, LOG_TRACE, "%s called: %.*s", __func__, |
| 1465 | json_tok_full_len(params), json_tok_full(buffer, params)); |
| 1466 | |
| 1467 | remove_layer(layer); |
| 1468 | |
| 1469 | response = jsonrpc_stream_success(cmd); |
| 1470 | return command_finished(cmd, response); |
| 1471 | } |
| 1472 | |
| 1473 | static struct command_result *json_askrene_listlayers(struct command *cmd, |
| 1474 | const char *buffer, |
nothing calls this directly
no test coverage detected