Ghost/ghost/admin/mirage/serializers/member.js

16 lines
409 B
JavaScript
Raw Normal View History

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);
}
});