diff --git a/addon/adapter.js b/addon/adapter.js index 3f0e4d4..8af877e 100644 --- a/addon/adapter.js +++ b/addon/adapter.js @@ -36,4 +36,18 @@ export default DS.JSONAPIAdapter.extend({ return this.ajax(url, 'GET', { data: query }); }, + + findMany(store, type, ids, snapshots) { + const url = this.buildURL(type.modelName, ids, snapshots, 'findMany'); + const filter = { + c: { + condition: { + path: 'uuid', + operator: 'IN', + value: ids + } + } + }; + return this.ajax(url, 'GET', { data: { filter: filter } }); + }, }); diff --git a/addon/serializer.js b/addon/serializer.js index 822dfb6..08e5930 100644 --- a/addon/serializer.js +++ b/addon/serializer.js @@ -65,6 +65,11 @@ const DrupalJSONAPISerializer = JSONAPISerializer.extend({ } return relationships; }, + + keyForRelationship(key) { + // Prevent dash-ification of underscores in relationship keys + return key; + }, }); -export default DrupalJSONAPISerializer; \ No newline at end of file +export default DrupalJSONAPISerializer;