Route-registration CALLS edges (via=route_registration) out of the function * `source_name`. */
| 9857 | /* Route-registration CALLS edges (via=route_registration) out of the function |
| 9858 | * `source_name`. */ |
| 9859 | static int route_registrations_from(cbm_store_t *s, const char *project, const char *source_name) { |
| 9860 | cbm_edge_t *edges = NULL; |
| 9861 | int edge_count = 0; |
| 9862 | if (cbm_store_find_edges_by_type(s, project, "CALLS", &edges, &edge_count) != CBM_STORE_OK) { |
| 9863 | return -1; |
| 9864 | } |
| 9865 | int matches = 0; |
| 9866 | for (int i = 0; i < edge_count; i++) { |
| 9867 | cbm_node_t source = {0}; |
| 9868 | int source_ok = cbm_store_find_node_by_id(s, edges[i].source_id, &source) == CBM_STORE_OK; |
| 9869 | if (source_ok && source.name && strcmp(source.name, source_name) == 0 && |
| 9870 | edges[i].properties_json && |
| 9871 | strstr(edges[i].properties_json, "\"via\":\"route_registration\"")) { |
| 9872 | matches++; |
| 9873 | } |
| 9874 | cbm_node_free_fields(&source); |
| 9875 | } |
| 9876 | if (edges) { |
| 9877 | cbm_store_free_edges(edges, edge_count); |
| 9878 | } |
| 9879 | return matches; |
| 9880 | } |
| 9881 | |
| 9882 | /* `import Axios from "axios"` -- the default-import binding capitalized, a |
| 9883 | * common convention -- must classify `Axios.get/post/delete(url)` as HTTP |
no test coverage detected