Method
doWrite
(data: string, callback: () => void)
Source from the content-addressed store, hash-verified
| 25 | } |
| 26 | |
| 27 | override doWrite(data: string, callback: () => void) { |
| 28 | this._fetch(data) |
| 29 | .then((res) => { |
| 30 | if (!res.ok) { |
| 31 | return this.onError("fetch write error", res.status, res); |
| 32 | } |
| 33 | |
| 34 | callback(); |
| 35 | }) |
| 36 | .catch((err) => { |
| 37 | this.onError("fetch write error", err); |
| 38 | }); |
| 39 | } |
| 40 | |
| 41 | private _fetch(data?: string) { |
| 42 | const isPost = data !== undefined; |
Callers
nothing calls this directly
Tested by
no test coverage detected