MCPcopy Create free account
hub / github.com/adcontextprotocol/adcp / resetKey

Method resetKey

server/src/middleware/pg-rate-limit-store.ts:97–105  ·  view source on GitHub ↗
(key: string)

Source from the content-addressed store, hash-verified

95 }
96
97 async resetKey(key: string): Promise<void> {
98 if (!isDatabaseInitialized()) return;
99 const prefixedKey = this.prefix + key;
100 try {
101 await query(`DELETE FROM rate_limit_hits WHERE key = $1`, [prefixedKey]);
102 } catch (err) {
103 logger.warn({ err, key: prefixedKey }, 'Rate limit resetKey failed');
104 }
105 }
106
107 async resetAll(): Promise<void> {
108 if (!isDatabaseInitialized()) return;

Callers 1

Calls 3

isDatabaseInitializedFunction · 0.85
queryFunction · 0.85
warnMethod · 0.80

Tested by

no test coverage detected