diff --git a/content/dwn_update.txt b/content/dwn_update.txt new file mode 100644 index 0000000..aa9b3a5 --- /dev/null +++ b/content/dwn_update.txt @@ -0,0 +1,17 @@ +Update from Decentralized Web Nodes +----- + + +// The following snippet allows you to update from your Web5 instance’s DWN: + +// Get the record +const { record } = await web5.dwn.records.read({ + message: { + filter: { + recordId: createdRecord.id + } + } +}); + +// Update the record +const {status} = await record.update({ data: "Hello, I'm updated!" });