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

Feat/add blocks api #3

Merged
merged 11 commits into from
Nov 1, 2024
Merged

Feat/add blocks api #3

merged 11 commits into from
Nov 1, 2024

Conversation

calvogenerico
Copy link
Collaborator

What ❔

Handling all api routes in proxy. There are filters still missing, but this should unblock front end development.

Why ❔

To have the proxy cover all the explorer api.

Checklist

  • PR title corresponds to the body of PR (we generate changelog entries from PRs).
  • Tests for the changes have been added / updated.
  • Documentation comments have been added / updated.

Added support for blocks bff api.
Added support for blocks bff api.
Implemented batch api.
Vitest file paralellism was causing issues with test server. This changes fixed them.
Added stats routes.
Added blind forward for transaction endpoints to unblock front end development.
Added blind forward for all endpoints to facilitate frontend development.

export function apiRoutes(app: FastifyApp) {
app.get('/', async (req, reply) => {
const targetUrl = `${app.conf.proxyTarget}${req.url}`;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this work without a / in the middle?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes! req.url starts with a slash. always.

@calvogenerico calvogenerico merged commit 122d2ed into main Nov 1, 2024
@calvogenerico calvogenerico deleted the feat/add-blocks-api branch November 1, 2024 19:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants