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

Function writeTokenCache

wxapp/hrj.js:79–85  ·  view source on GitHub ↗
(cache)

Source from the content-addressed store, hash-verified

77}
78
79function writeTokenCache(cache) {
80 try {
81 fs.writeFileSync(TOKEN_CACHE_FILE, JSON.stringify(cache, null, 2), "utf8");
82 } catch (e) {
83 $.log(`写入token缓存失败: ${e.message || e}`);
84 }
85}
86
87function isTokenError(message) {
88 return /token|登录|授权|invalid|expire|过期|1041|401|403/i.test(String(message || ""));

Callers 2

saveCachedTokenMethod · 0.70
removeCachedTokenMethod · 0.70

Calls 1

logMethod · 0.45

Tested by

no test coverage detected