Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: additional path for /ota of ar molecule #34

Merged
merged 1 commit into from
Feb 12, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
chore: additional path for /ota of ar molecule
  • Loading branch information
charmful0x authored Feb 12, 2023
commit 4b90e74e0e0c01605edfec6bbcc09a5ff18ab225
14 changes: 14 additions & 0 deletions src/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,20 @@ app.get("/ota/:pubkey", async (req, res) => {
}
});

app.get("/ar-ota/:pubkey", async (req, res) => {
try {
res.setHeader("Content-Type", "application/json");

const address = await ownerToAddress(req.params?.pubkey);
res.send({ address });
return;
} catch (error) {
res.send({ address: null });
return;
}
});


app.get("/signer/:address/:message/:signature", async (req, res) => {
try {
res.setHeader("Content-Type", "application/json");
Expand Down