Upgrade to Flow 0.71

This commit is contained in:
Tom Moor
2018-05-05 16:16:08 -07:00
parent 4a4f9f7107
commit 518015f55b
256 changed files with 23205 additions and 3658 deletions

View File

@ -1,10 +1,12 @@
// @flow
import _ from 'lodash';
import { Op } from 'sequelize';
import Sequelize from 'sequelize';
import { User, Document } from '../models';
import presentUser from './user';
import presentCollection from './collection';
const Op = Sequelize.Op;
type Options = {
includeCollaborators?: boolean,
};
@ -61,7 +63,10 @@ async function present(ctx: Object, document: Document, options: ?Options) {
// This could be further optimized by using ctx.cache
data.collaborators = await User.findAll({
where: {
id: { [Op.in]: _.takeRight(document.collaboratorIds, 10) || [] },
id: {
// $FlowFixMe
[Op.in]: _.takeRight(document.collaboratorIds, 10) || [],
},
},
}).map(user => presentUser(ctx, user));