Hide Count Data When Both KV and API Enabled

Requirement

When both visit_count and load_kv are enabled, the result will be displayed as follows.

Link https://1way.eu.org/C8NW6p-count and the number 1 next to a red X button and a cyan question mark button

Comments also mentioned the hope to hide it.

Diet health blog code screenshot highlighting includes check for password in key name


Approach

When qryall assembles the returned data, skip data ending with '-count'.

Code screenshot with red box marking the endsWith logic that filters the -count key


========

End

Github: https://github.com/crazypeace/Url-Shorten-Worker

Demo: https://1way.eu.org/bodongshouqulveweifengci  You can view the visit count, but you cannot see the query result of -count

Comments