Skip to content

Commit

Permalink
Create dwn_update.txt (#19)
Browse files Browse the repository at this point in the history
  • Loading branch information
EbonyLouis authored Dec 18, 2023
1 parent cd07ff8 commit f52f933
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions content/dwn_update.txt
Original file line number Diff line number Diff line change
@@ -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!" });

0 comments on commit f52f933

Please sign in to comment.