Skip to content

Commit 0824c97

Browse files
remoreJakeChampion
authored andcommitted
Fix a documentation bug in KVStore.prototype.put
The code at Examples section gives me an error log below; ``` stderr | c8285363 | Error while running request handler: put: At least 2 arguments required, but only 1 passed stderr | c8285363 | Stack: stderr | c8285363 | app@<stdin>:9:31 stderr | c8285363 | async*@<stdin>:12:58 ``` This can be fixed by changing the following put() call to get() ``` const entry = await files.get('hello') ``` Sorry for pointing out nit-picking error all the time, I just ran into this error today when I joined a workshop at a local site.
1 parent a8f6ad3 commit 0824c97

File tree

1 file changed

+1
-1
lines changed
  • documentation/docs/fastly:kv-store/KVStore/prototype

1 file changed

+1
-1
lines changed

documentation/docs/fastly:kv-store/KVStore/prototype/put.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ async function app(event) {
5858

5959
await files.put('hello', 'world')
6060

61-
const entry = await files.put('hello')
61+
const entry = await files.get('hello')
6262

6363
return new Response(await entry.text())
6464
}

0 commit comments

Comments
 (0)