spruceid / tzprofiles

Create portable verified profiles on Tezos with public accounts.
https://tzprofiles.com
Apache License 2.0
38 stars 17 forks source link

DNS Verification #142

Closed kevinz917 closed 3 years ago

cloudflare-workers-and-pages[bot] commented 3 years ago

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: 0f14153
Status: ✅  Deploy successful!
Preview URL: https://b7e75cde.tzprofiles.pages.dev

View logs

krhoda commented 3 years ago

Looks good from going over the code, the only things I see that need to change are the the log level in the worker got turned to trace and the webpack.config.js changed to point locally got committed, so I'd revert those 2.

I'm curious addition of the vc crate's URL type to the worker, do all links in VCs need to be updated like that?

Also, I saw code that was roughly:

let res = await fetch(...);
let dataStr = await res.text();
let data = JSON.parse(dataStr);

and there's a nice helper for that case:

let res = await fetch(...);
let data = await res.json();

You can only call a res.body consuming function once though, so .text() after .json() (or calling any combination of them after the first) will err out, so there times it's still helpful to JSON.parse afterwards when you want the string too. Not anything that has to change, but res.json() is nice to know about.