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

Method saveCachedToken

wxapp/roki.js:132–144  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

130 }
131
132 saveCachedToken() {
133 if (!this.token) return;
134 const cache = readTokenCache();
135 cache[this.account] = {
136 token: this.token,
137 aiToken: this.aiToken,
138 expireTime: this.expireTime,
139 userId: this.userInfo.id || "",
140 mobile: this.userInfo.mobile || "",
141 updatedAt: new Date().toISOString(),
142 };
143 writeTokenCache(cache);
144 }
145
146 removeCachedToken() {
147 const cache = readTokenCache();

Callers 2

loginByWxCodeMethod · 0.95
getUserInfoMethod · 0.95

Calls 2

readTokenCacheFunction · 0.70
writeTokenCacheFunction · 0.70

Tested by

no test coverage detected