Build the rejection payload for a set_sections request that never reached a * store. Caller frees. */
| 19944 | /* Build the rejection payload for a set_sections request that never reached a |
| 19945 | * store. Caller frees. */ |
| 19946 | static char *adr_section_updates_error(const adr_section_updates_t *u) { |
| 19947 | yyjson_mut_doc *doc = yyjson_mut_doc_new(NULL); |
| 19948 | yyjson_mut_val *root_obj = yyjson_mut_obj(doc); |
| 19949 | yyjson_mut_doc_set_root(doc, root_obj); |
| 19950 | yyjson_mut_obj_add_str(doc, root_obj, "status", u->status); |
| 19951 | yyjson_mut_obj_add_strcpy(doc, root_obj, "error", u->error); |
| 19952 | char *json = yy_doc_to_str(doc); |
| 19953 | yyjson_mut_doc_free(doc); |
| 19954 | return json; |
| 19955 | } |
| 19956 | |
| 19957 | static char *handle_manage_adr(cbm_mcp_server_t *srv, const char *args) { |
| 19958 | char *project = get_project_arg(args); |
no test coverage detected