Closed wa0x6e closed 2 months ago
Working towards https://github.com/snapshot-labs/workflow/issues/142
See also https://discord.com/channels/955773041898573854/1282876175642918964/1283367668648382587
This PR will add a new /api/domain endpoint to return a custom domain associated to an offchain space.
/api/domain
Domains list will be pulled from the snapshot-spaces repo, be cached in memory, and refreshed every 5 minutes.
yarn dev
curl http://localhost:3005/api/domains/vote.lends.so
{"domain":"vote.lends.so","space_id":"s:lendsdao.eth"}
curl http://localhost:3005/api/domains/random
{"domain":"vote.lends.so","space_id":null}
Working towards https://github.com/snapshot-labs/workflow/issues/142
See also https://discord.com/channels/955773041898573854/1282876175642918964/1283367668648382587
This PR will add a new
/api/domain
endpoint to return a custom domain associated to an offchain space.Domains list will be pulled from the snapshot-spaces repo, be cached in memory, and refreshed every 5 minutes.
Test
yarn dev
curl http://localhost:3005/api/domains/vote.lends.so
{"domain":"vote.lends.so","space_id":"s:lendsdao.eth"}
curl http://localhost:3005/api/domains/random
{"domain":"vote.lends.so","space_id":null}