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,6 +1,6 @@
// @flow
import Router from 'koa-router';
import { Op } from 'sequelize';
import Sequelize from 'sequelize';
import auth from './middlewares/authentication';
import pagination from './middlewares/pagination';
import { presentDocument, presentRevision } from '../presenters';
@ -9,6 +9,7 @@ import { InvalidRequestError } from '../errors';
import events from '../events';
import policy from '../policies';
const Op = Sequelize.Op;
const { authorize } = policy;
const router = new Router();
@ -50,6 +51,7 @@ router.post('documents.pinned', auth(), pagination(), async ctx => {
teamId: user.teamId,
atlasId: collection,
pinnedById: {
// $FlowFixMe
[Op.ne]: null,
},
},
@ -138,6 +140,7 @@ router.post('documents.drafts', auth(), pagination(), async ctx => {
const user = ctx.state.user;
const documents = await Document.findAll({
// $FlowFixMe
where: { userId: user.id, publishedAt: { [Op.eq]: null } },
order: [[sort, direction]],
offset: ctx.state.pagination.offset,