I'm trying to use this fetch to then add some data into the KV on the .then how do I exactly structure this with the innermost function being async? At the moment I get the error Uncaught SyntaxError: Unexpected reserved word
This is the code:
fetch('https://www.uuidtools.com/api/generate/v4')
.then (data => {
await NAMESPACE.put(id, data)
})