MCPcopy Create free account
hub / github.com/smallfawn/QLScriptPublic / getCachedToken

Method getCachedToken

wxapp/roki.js:124–130  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

122 }
123
124 getCachedToken() {
125 const cache = readTokenCache();
126 const item = cache[this.account];
127 if (!item || !item.token) return null;
128 if (item.expireTime && Number(item.expireTime) < Date.now()) return null;
129 return item;
130 }
131
132 saveCachedToken() {
133 if (!this.token) return;

Callers 1

runMethod · 0.95

Calls 1

readTokenCacheFunction · 0.70

Tested by

no test coverage detected