(key: string)
| 30 | }, |
| 31 | |
| 32 | async redisGet(key: string) { |
| 33 | const res = await fetch(this.path(`get/${key}`, proxyUrl), { |
| 34 | method: "GET", |
| 35 | headers: this.headers(), |
| 36 | }); |
| 37 | |
| 38 | console.log("[Upstash] get key = ", key, res.status, res.statusText); |
| 39 | const resJson = (await res.json()) as { result: string }; |
| 40 | |
| 41 | return resJson.result; |
| 42 | }, |
| 43 | |
| 44 | async redisSet(key: string, value: string) { |
| 45 | const res = await fetch(this.path(`set/${key}`, proxyUrl), { |