(extra = {})
| 148 | } |
| 149 | |
| 150 | saveCache(extra = {}) { |
| 151 | const cache = readCache(); |
| 152 | cache[this.cacheKey] = { |
| 153 | ...(cache[this.cacheKey] || {}), |
| 154 | ...(this.token ? { token: this.token } : {}), |
| 155 | ...(this.member?.id ? { memberId: this.member.id } : {}), |
| 156 | ...extra, |
| 157 | updatedAt: new Date().toISOString(), |
| 158 | }; |
| 159 | writeCache(cache); |
| 160 | } |
| 161 | |
| 162 | removeToken() { |
| 163 | const cache = readCache(); |
no test coverage detected