()
| 77 | } |
| 78 | |
| 79 | public async getData() { |
| 80 | const data = (await this.ctx.storage.list()) as Map<string, any> |
| 81 | return Array.from(data.entries()) |
| 82 | .filter(([key, _]) => key.startsWith("session/")) |
| 83 | .map(([key, content]) => ({ key, content })) |
| 84 | } |
| 85 | |
| 86 | public async assertSecret(secret: string) { |
| 87 | if (secret !== (await this.getSecret())) throw new Error("Invalid secret") |
no test coverage detected