Open Fighteros opened 3 years ago
json server using _embed returns an empty array
my db file
{ "id": 2, "companyName": "Coffee Mockal", "employees": [ { "id": 1, "username": "Moustapha Mohamed", "email": "moustapha11@fakedata.json.server" }, { "id": 2, "username": "Ali Mohamed", "email": "Ali@fakedata.json.server" }, { "id": 3, "username": "Mohamed Aymen", "email": "Mohamed Aymen@fakedata.json.server" }, { "id": 1, "username": "Moustapha Mohamed", "email": "moustapha11@fakedata.json.server" }, { "id": 2, "username": "Ali Mohamed", "email": "Ali@fakedata.json.server" }, { "id": 3, "username": "Mohamed Aymen", "email": "Mohamed Aymen@fakedata.json.server" }, { "id": 1, "username": "Moustapha Mohamed", "email": "moustapha11@fakedata.json.server" }, { "id": 2, "username": "Ali Mohamed", "email": "Ali@fakedata.json.server" }, { "id": 3, "username": "Mohamed Aymen", "email": "Mohamed Aymen@fakedata.json.server" }, { "id": 1, "username": "Moustapha Mohamed", "email": "moustapha11@fakedata.json.server" }, { "id": 2, "username": "Ali Mohamed", "email": "Ali@fakedata.json.server" }, { "id": 3, "username": "Mohamed Aymen", "email": "Mohamed Aymen@fakedata.json.server" } ] }
when i try http://localhost:5000/companies/2?_embed=employees
the server responds with an empty array
json server using _embed returns an empty array
my db file
{ "id": 2, "companyName": "Coffee Mockal", "employees": [ { "id": 1, "username": "Moustapha Mohamed", "email": "moustapha11@fakedata.json.server" }, { "id": 2, "username": "Ali Mohamed", "email": "Ali@fakedata.json.server" }, { "id": 3, "username": "Mohamed Aymen", "email": "Mohamed Aymen@fakedata.json.server" }, { "id": 1, "username": "Moustapha Mohamed", "email": "moustapha11@fakedata.json.server" }, { "id": 2, "username": "Ali Mohamed", "email": "Ali@fakedata.json.server" }, { "id": 3, "username": "Mohamed Aymen", "email": "Mohamed Aymen@fakedata.json.server" }, { "id": 1, "username": "Moustapha Mohamed", "email": "moustapha11@fakedata.json.server" }, { "id": 2, "username": "Ali Mohamed", "email": "Ali@fakedata.json.server" }, { "id": 3, "username": "Mohamed Aymen", "email": "Mohamed Aymen@fakedata.json.server" }, { "id": 1, "username": "Moustapha Mohamed", "email": "moustapha11@fakedata.json.server" }, { "id": 2, "username": "Ali Mohamed", "email": "Ali@fakedata.json.server" }, { "id": 3, "username": "Mohamed Aymen", "email": "Mohamed Aymen@fakedata.json.server" } ] }
when i try http://localhost:5000/companies/2?_embed=employees
the server responds with an empty array