0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-17 23:44:39 -05:00

Fixed include transformation in query for embedded relations

refs https://github.com/TryGhost/Team/issues/1029

- `?include` query in API needs to be transformed from camel case to snake case
- the transformation was missing for building query in relationship adapter, causing incorrect camel-case `?include` in api like `emailRecipients` instead of `email_recipients`
This commit is contained in:
Rishabh 2022-02-28 14:15:45 +05:30
parent 84065585e1
commit a7ef6c97e8

View file

@ -109,7 +109,7 @@ export default class EmbeddedRelationAdapter extends BaseAdapter {
deDupe[include] = true;
});
query.include = Object.keys(deDupe).join(',');
query.include = Object.keys(deDupe).map(underscore).join(',');
}
}