| 1402 | } |
| 1403 | |
| 1404 | static struct command_result *json_askrene_listlayers(struct command *cmd, |
| 1405 | const char *buffer, |
| 1406 | const jsmntok_t *params) |
| 1407 | { |
| 1408 | struct askrene *askrene = get_askrene(cmd->plugin); |
| 1409 | struct layer *layer; |
| 1410 | struct json_stream *response; |
| 1411 | |
| 1412 | if (!param(cmd, buffer, params, |
| 1413 | p_opt("layer", param_known_layer, &layer), |
| 1414 | NULL)) |
| 1415 | return command_param_failed(); |
| 1416 | plugin_log(cmd->plugin, LOG_TRACE, "%s called: %.*s", __func__, |
| 1417 | json_tok_full_len(params), json_tok_full(buffer, params)); |
| 1418 | |
| 1419 | response = jsonrpc_stream_success(cmd); |
| 1420 | json_add_layers(response, askrene, "layers", layer); |
| 1421 | return command_finished(cmd, response); |
| 1422 | } |
| 1423 | |
| 1424 | static struct command_result *json_askrene_age(struct command *cmd, |
| 1425 | const char *buffer, |
nothing calls this directly
no test coverage detected