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

BEDS-97/add-flag-mock-data #977

Merged
merged 2 commits into from
Oct 17, 2024
Merged

Conversation

marcel-bitfly
Copy link
Contributor

Api provides a fall back for mocked data for testing purposes.
When backend changes are already merged,
frontend might need a way to still get mocked data.

See: 1fc71de

Our `bundler` vite can `handle` this formatting much better.

E.g. all of these work like expected:
`NUXT_PUBLIC_X= something`
`NUXT_PUBLIC_X=something`
`NUXT_PUBLIC_X=hello world`
`NUXT_PUBLIC_X=false`
`NUXT_PUBLIC_X="false"`
`NUXT_PUBLIC_X=https://something.com?test=true`
Api provides a `fall back` for `mocked data` for `testing purposes`.
When `backend changes` are already merged,
frontend might need a way to still get `mocked data`.

See: 1fc71de
Comment on lines +125 to +132
## Get mocked api data

If your `user` was added to the `ADMIN` or `DEV` group by the `api team`, you can get
`mocked data` from the `api` for certain `endpoints` by adding `?is_mocked=true` as a
`query parameter`.

You can `turn on` mocked data `globally` for all `configured enpoints` by setting `NUXT_PUBLIC_IS_API_MOCKED=true`.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@LuccaBitfly plz correct me if I am wrong here

Copy link

Deploying beaconchain with  Cloudflare Pages  Cloudflare Pages

Latest commit: 5759a17
Status: ✅  Deploy successful!
Preview URL: https://a93e7c4d.beaconchain.pages.dev
Branch Preview URL: https://beds-97-add-flag-mock-data.beaconchain.pages.dev

View logs

@marcel-bitfly marcel-bitfly merged commit e7b050e into staging Oct 17, 2024
2 checks passed
@marcel-bitfly marcel-bitfly deleted the BEDS-97/add-flag-mock-data branch October 17, 2024 14:13
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.

1 participant