(extra = {})
| 137 | } |
| 138 | |
| 139 | saveCache(extra = {}) { |
| 140 | const cache = readCache(); |
| 141 | cache[this.cacheKey] = { |
| 142 | ...(cache[this.cacheKey] || {}), |
| 143 | ...(this.token ? { token: this.token } : {}), |
| 144 | ...(this.userId ? { userId: this.userId } : {}), |
| 145 | ...extra, |
| 146 | updatedAt: new Date().toISOString(), |
| 147 | }; |
| 148 | writeCache(cache); |
| 149 | } |
| 150 | |
| 151 | removeToken() { |
| 152 | const cache = readCache(); |
no test coverage detected