Skip to content

Commit

Permalink
Add / endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
Leonid committed Sep 8, 2022
1 parent b4b8a23 commit 7c587c3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions zp-relayer/endpoints.ts
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,10 @@ async function getLimits(req: Request, res: Response) {
res.json(limitsFetch)
}

function root(req: Request, res: Response) {
return res.sendStatus(200)
}

export default {
txProof,
sendTransaction,
Expand All @@ -191,4 +195,5 @@ export default {
relayerInfo,
getFee,
getLimits,
root,
}
1 change: 1 addition & 0 deletions zp-relayer/router.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ router.use((err: any, req: Request, res: Response, next: NextFunction) => {
// Used only for testing as proving on client is now slow
router.post('/proof_tx', endpoints.txProof)

router.get('/', endpoints.root)
router.post('/sendTransaction', wrapErr(endpoints.sendTransaction))
router.post('/sendTransactions', wrapErr(endpoints.sendTransactions))
router.get('/transactions', wrapErr(endpoints.getTransactions))
Expand Down

0 comments on commit 7c587c3

Please sign in to comment.