import { ActiveModelSerializer } from 'ember-cli-mirage';

export default ActiveModelSerializer.extend({
  embed: false,
  serialize(model, request) {
    let streamSerializer = this.serializerFor('stream');
    return {
      recently_watched_streams: model.streams.models.map(m => streamSerializer.serialize(m.stream, request).stream)
    };
  }
});
