MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / log_query_has_key

Function log_query_has_key

src/ui/http_server.c:545–556  ·  view source on GitHub ↗

GET /api/logs?lines=N — returns last N log lines */

Source from the content-addressed store, hash-verified

543
544/* GET /api/logs?lines=N — returns last N log lines */
545static bool log_query_has_key(const char *query, const char *key) {
546 for (const char *part = query; part && *part;) {
547 size_t size = strcspn(part, "&");
548 size_t key_size = strcspn(part, "=&");
549 if (key_size == strlen(key) && !strncmp(part, key, key_size))
550 return true;
551 part += size;
552 if (*part == '&')
553 part++;
554 }
555 return false;
556}
557
558static void handle_logs(cbm_http_conn_t *c, const cbm_http_req_t *req) {
559 char lines_str[16] = {0};

Callers 1

handle_logsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected