Skip to content
14 changes: 14 additions & 0 deletions addon/adapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 } });
},
});
7 changes: 6 additions & 1 deletion addon/serializer.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
export default DrupalJSONAPISerializer;