Hi all!
I have 2 collections :
Collection A {
String groupName;
CollectionLink<Collection B> users;
}
When I add a new user using the API with a request like :
{
"data": {
"_id": "idOfTheCollectionAIWantToUpdate",
"users": [
{
"_id": "IdOfAUserIWantToAdd"
}
]
}
}
I can see that the request worked because cockpit recognizes the new user on the web interface. But when I use the cockpit’s API to get the edited collection, cockpit gives me a JSON with only the user’s ID :
Collection A {
"groupName": "AwesomeName",
"users": [
{
"_id": "IdOfAUser"
}
...
When I want something like :
...
Collection A {
"groupName": "AwesomeName",
"users": [
{
"_id": "IdOfAUser",
"username": "MyAwesomeUserUsername",
"email": "email@....",
// all the other fields of the user
}
...
Is it possible to achieve this ?
Thank you !