mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-25 09:03:12 +03:00
2bf311edc8
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
16 lines
409 B
JavaScript
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);
|
|
}
|
|
});
|