1//NOTE if accessing this in a localhost configuration fails with "CORS request
2// did not succeed", you might need to visit localhost:3001 or whatever
3// explicitly and tell your browser that's safe to access.
4// https://stackoverflow.com/a/53011185/1334324
5const baseUrl = 'https://onboarding-emails.urbit.org:3002';
7function sendRequest(where, what) {
8 return new Promise((resolve, reject) => {
9 fetch(baseUrl + where, {
13 'Content-Type': 'application/json',
15 body: JSON.stringify(what),
19 resolve(response.json());
28async function hasReceived(recipient) {
29 const res = await sendRequest('/has-received', { recipient });
30 return res.hasReceived;
33function sendMail(recipient, ticket, sender, message, tx) {
34 return sendRequest('/send-ticket', {
43export { hasReceived, sendMail };
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list