Ghost/ghost/admin/mirage/serializers/member.js
Kevin Ansfield 2bf311edc8 Updated label filtering test to check labels column is populated correctly
no issue

- updated assertions to check that labels are shown inside the labels column when filtering members list by label
- added a member serializer to mirage so that relationships are correctly expanded to full embedded records
2022-02-23 13:54:23 +00:00

16 lines
409 B
JavaScript

import BaseSerializer from './application';
export default BaseSerializer.extend({
embed: true,
include(request) {
let queryIncludes = (request.queryParams.include || '').split(',').compact();
const includes = new Set(queryIncludes);
// embedded records that are included by default in the API
includes.add('labels');
return Array.from(includes);
}
});