(raw)
| 269 | |
| 270 | class Task { |
| 271 | constructor(raw) { |
| 272 | this.index = $.userIdx++; |
| 273 | const account = parseAccount(raw); |
| 274 | this.openid = account.openid; |
| 275 | this.cookies = parseCookie(account.cookie); |
| 276 | this.secret = account.secret || ""; |
| 277 | this.uid = this.cookies.uid || ""; |
| 278 | this.clockConfig = {}; |
| 279 | this.cacheKey = this.openid || this.cookies.uid || (account.cookie ? md5(account.cookie).slice(0, 16) : `account_${this.index}`); |
| 280 | } |
| 281 | |
| 282 | getCached() { |
| 283 | return readCache()[this.cacheKey] || {}; |
nothing calls this directly
no test coverage detected