cid icon indicating copy to clipboard operation
cid copied to clipboard

Make a CID from an Ecto Changeset

Open nelsonic opened this issue 6 years ago • 1 comments

  • [x] Given an ECTO changeset, return a cid (hash).

nelsonic avatar Dec 03 '18 22:12 nelsonic

https://github.com/dwyl/cid/pull/21 will work with an Ecto.changeset. Ecto changesets are structs themselves, which means that we can call Map.from_struct/1 on a changeset and get a map.

That map can then be turned into a JSON string, hashed and turned into a CID.

RobStallion avatar Jan 28 '19 12:01 RobStallion