ATLBitLab / twelvecash

API for creating BIP-353 usernames
https://twelve.cash
MIT License
22 stars 5 forks source link

Fix duplicate txt record #23

Closed chdwlch closed 3 months ago

chdwlch commented 3 months ago

fix-duplicates-v1

#initial creation
curl -X POST http://localhost:3000/record -H "Content-Type: application/json" -d  '{"localPart": "cw-test-70", "bolt12": "lno...."}'
{"message":"Bolt12 Address Created"}

# same name and values
curl -X POST http://localhost:3000/record -H "Content-Type: application/json" -d  '{"localPart": "cw-test-70", "bolt12": "lno...."}'
{"message":"Name is already taken."}

# same name different values
curl -X POST http://localhost:3000/record -H "Content-Type: application/json" -d  '{"localPart": "cw-test-70", "bolt12": "lno....zzz"}'
{"message":"Name is already taken."}
netlify[bot] commented 3 months ago

Deploy Preview for twelvecash ready!

Name Link
Latest commit 31e9e52705aec551c149ef1e4b9e30bc9c0980d3
Latest deploy log https://app.netlify.com/sites/twelvecash/deploys/669693177037300008cc0dc2
Deploy Preview https://deploy-preview-23--twelvecash.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

chdwlch commented 3 months ago

Issue with DoH lookup is that there is a delay before the records are propagated... There is about 5 seconds before the duplicate check there will work