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

Getting nested resources doesn't work #1556

Open
pchabros opened this issue Jun 4, 2024 · 1 comment
Open

Getting nested resources doesn't work #1556

pchabros opened this issue Jun 4, 2024 · 1 comment

Comments

@pchabros
Copy link

pchabros commented Jun 4, 2024

This does not work for me. Returns Not found. I use version ^1.0.0-beta.0.


For nested resources to work, you need to structure your db.json this way:

{
  "environments": [
    { "id": 12 },
    { "id": 19 }
  ],
  "reports": [
    { "id": 17, "environmentId": 12 },
    { "id": 25, "environmentId": 12 }
  ]
}

Then /environments/12/reports should return reports that have environmentId === 12

Originally posted by @typicode in #72 (comment)

@Tzal3x
Copy link

Tzal3x commented Jul 4, 2024

Same issue for me: #1567

Did you get over this somehow? What runtime are you using? npm/bun/deno?

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

No branches or pull requests

2 participants